Index: chrome/browser/extensions/extension_window_list.cc |
diff --git a/chrome/browser/extensions/extension_window_list.cc b/chrome/browser/extensions/extension_window_list.cc |
index 73aaab862bd247f7537d72e45be55e2f16df1047..adaf12ecea7b27df32a13828a8ca1589be846eb5 100644 |
--- a/chrome/browser/extensions/extension_window_list.cc |
+++ b/chrome/browser/extensions/extension_window_list.cc |
@@ -37,12 +37,11 @@ void ExtensionWindowList::RemoveExtensionWindow( |
} |
ExtensionWindowController* ExtensionWindowList::FindWindowById( |
- Profile* profile, |
- ProfileMatchType match_type, |
+ UIThreadExtensionFunction* function, |
int id) const { |
for (WindowList::const_iterator iter = windows().begin(); |
iter != windows().end(); ++iter) { |
- if ((*iter)->MatchesProfile(profile, match_type)) { |
+ if ((*iter)->IsVisibleToFunction(function)) { |
if ((*iter)->GetWindowId() == id) |
return *iter; |
} |
@@ -51,13 +50,12 @@ ExtensionWindowController* ExtensionWindowList::FindWindowById( |
} |
ExtensionWindowController* ExtensionWindowList::CurrentWindow( |
- Profile* profile, |
- ProfileMatchType match_type) const { |
+ UIThreadExtensionFunction* function) const { |
ExtensionWindowController* result = NULL; |
// Returns either the focused window (if any), or the last window in the list. |
for (WindowList::const_iterator iter = windows().begin(); |
iter != windows().end(); ++iter) { |
- if ((*iter)->MatchesProfile(profile, match_type)) { |
+ if ((*iter)->IsVisibleToFunction(function)) { |
result = *iter; |
if (result->window()->IsActive()) |
break; // use focused window |