Add GetWindows helper that returns a vector
This commit is contained in:
parent
0883a9f966
commit
da5d7d72b0
5 changed files with 11 additions and 21 deletions
|
@ -104,8 +104,7 @@ NativeWindow::~NativeWindow() {
|
|||
// static
|
||||
NativeWindow* NativeWindow::FromWebContents(
|
||||
content::WebContents* web_contents) {
|
||||
WindowList& window_list = *WindowList::GetInstance();
|
||||
for (NativeWindow* window : window_list) {
|
||||
for (const auto& window : WindowList::GetWindows()) {
|
||||
if (window->web_contents() == web_contents)
|
||||
return window;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue