Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4363)

Unified Diff: chrome/browser/extensions/extension_window_list.cc

Issue 10407035: Extension/Platform App window isolation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698