Index: chrome/browser/extensions/window_controller.h |
diff --git a/chrome/browser/extensions/window_controller.h b/chrome/browser/extensions/window_controller.h |
index f21a0fa83086e54d5c13b7a1531b0c2dfdb55b40..73d3907b55a23502dd27eee130695bb0d6ea7a05 100644 |
--- a/chrome/browser/extensions/window_controller.h |
+++ b/chrome/browser/extensions/window_controller.h |
@@ -9,6 +9,7 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
+#include "chrome/common/extensions/api/windows.h" |
class Browser; // TODO(stevenjb) eliminate this dependency. |
class GURL; |
@@ -41,6 +42,21 @@ class WindowController { |
REASON_NOT_EDITABLE, |
}; |
+ // A bitmaks used as filter on window types. |
+ using TypeFilter = uint32_t; |
+ |
+ // Returns a filter allowing all window types to be manipulated |
+ // through the chrome.windows APIs. |
+ static TypeFilter GetAllWindowFilter(); |
+ |
+ // Returns the default filter to be used when operating on the windows |
+ // from WindowControllerList when using the chrome.windows APIs. |
+ static TypeFilter GetDefaultWindowFilter(); |
+ |
+ // Builds a filter out of a vector of window types. |
+ static TypeFilter GetFilterFromWindowTypes( |
+ const std::vector<api::windows::WindowType>& types); |
+ |
WindowController(ui::BaseWindow* window, Profile* profile); |
virtual ~WindowController(); |
@@ -83,6 +99,9 @@ class WindowController { |
// need to define this behavior. |
virtual bool IsVisibleToExtension(const Extension* extension) const = 0; |
+ // Returns true if the window type of the controller matches the |filter|. |
+ bool MatchesFilter(TypeFilter filter) const; |
+ |
private: |
ui::BaseWindow* window_; |
Profile* profile_; |