Index: chrome/browser/extensions/window_controller_list.h |
diff --git a/chrome/browser/extensions/window_controller_list.h b/chrome/browser/extensions/window_controller_list.h |
index c280e07336b97f17cc4f34a7c5c37ff972b8f76b..8029123ba0c14bcf99dc7629da355405414408c3 100644 |
--- a/chrome/browser/extensions/window_controller_list.h |
+++ b/chrome/browser/extensions/window_controller_list.h |
@@ -11,6 +11,7 @@ |
#include "base/memory/singleton.h" |
#include "base/observer_list.h" |
#include "chrome/browser/extensions/window_controller.h" |
+#include "chrome/common/extensions/api/windows.h" |
class Profile; |
class UIThreadExtensionFunction; |
@@ -23,6 +24,7 @@ class WindowControllerListObserver; |
class WindowControllerList { |
public: |
typedef std::list<WindowController*> ControllerList; |
+ typedef std::vector<api::windows::WindowType> ControllerFilter; |
WindowControllerList(); |
~WindowControllerList(); |
@@ -36,16 +38,34 @@ class WindowControllerList { |
// Returns a window matching |id|. |
WindowController* FindWindowById(int id) const; |
+ // Returns a window matching |id| using |filter|. |
+ WindowController* FindWindowByIdWithFilter( |
+ int id, |
+ const ControllerFilter& filter) const; |
+ |
// Returns a window matching the context the function was invoked in. |
WindowController* FindWindowForFunctionById( |
const UIThreadExtensionFunction* function, |
int id) const; |
+ // Returns a window matching the context the function was invoked in |
+ // using |filter|. |
+ WindowController* FindWindowForFunctionByIdWithFilter( |
+ const UIThreadExtensionFunction* function, |
+ int id, |
+ const ControllerFilter& filter) const; |
+ |
// Returns the focused or last added window matching the context the function |
// was invoked in. |
WindowController* CurrentWindowForFunction( |
const UIThreadExtensionFunction* function) const; |
+ // Returns the focused or last added window matching the context the function |
+ // was invoked in using |filter|. |
+ WindowController* CurrentWindowForFunctionWithFilter( |
+ const UIThreadExtensionFunction* function, |
+ const ControllerFilter& filter) const; |
+ |
const ControllerList& windows() const { return windows_; } |
static WindowControllerList* GetInstance(); |