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..208c438f75a1f80dba2ded90a371e5c7096c8a29 100644 |
--- a/chrome/browser/extensions/window_controller_list.h |
+++ b/chrome/browser/extensions/window_controller_list.h |
@@ -17,6 +17,18 @@ class UIThreadExtensionFunction; |
namespace extensions { |
+// A set bit field values to be used as a WindowTypeFilter. This enum |
+// needs to stay in sync with extensions::api::windows::WindowType. |
+enum WindowTypeFilterValues : uint32 { |
not at google - send to devlin
2015/08/04 18:05:03
Hm, I've never seen ": uint32" be needed before, i
llandwerlin-old
2015/08/05 11:01:22
dropped the : uint32 and moved the enum inside win
|
+ WINDOW_TYPE_FILTER_NONE = 0, |
+ WINDOW_TYPE_FILTER_NORMAL = 1 << 1, |
+ WINDOW_TYPE_FILTER_POPUP = 1 << 2, |
+ WINDOW_TYPE_FILTER_PANEL = 1 << 3, |
+ WINDOW_TYPE_FILTER_APP = 1 << 4, |
+ WINDOW_TYPE_FILTER_DEVTOOLS = 1 << 5 |
+}; |
+typedef uint32 WindowTypeFilter; |
+ |
class WindowControllerListObserver; |
// Class to maintain a list of WindowControllers. |
@@ -36,16 +48,33 @@ class WindowControllerList { |
// Returns a window matching |id|. |
WindowController* FindWindowById(int id) const; |
+ // Returns a window matching |id| using |filter|. |
+ WindowController* FindWindowByIdWithFilter(int id, |
+ WindowTypeFilter 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, |
+ WindowTypeFilter 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, |
+ WindowTypeFilter filter) const; |
+ |
const ControllerList& windows() const { return windows_; } |
static WindowControllerList* GetInstance(); |