Chromium Code Reviews| 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..036bf3a8e966f00134530a80b8327d2718860553 100644 |
| --- a/chrome/browser/extensions/window_controller.h |
| +++ b/chrome/browser/extensions/window_controller.h |
| @@ -30,6 +30,9 @@ class BaseWindow; |
| namespace extensions { |
| class Extension; |
| +// A bitmaks used as filter on window types. |
| +typedef uint32 WindowTypeFilter; |
|
not at google - send to devlin
2015/08/05 17:33:25
We're supposed to use "using" these days. I'd also
llandwerlin-old
2015/08/05 18:12:02
Done.
|
| + |
| // This API needs to be implemented by any window that might be accessed |
| // through chrome.windows or chrome.tabs (e.g. browser windows and panels). |
| // Subclasses must add/remove themselves from the WindowControllerList |
| @@ -41,6 +44,14 @@ class WindowController { |
| REASON_NOT_EDITABLE, |
| }; |
| + // Returns a filter allowing all window types to be manipulated |
| + // through the chrome.windows APIs. |
| + static WindowTypeFilter GetAllWindowFilter(); |
| + |
| + // Returns the default filter to be used when operating on the windows |
| + // from WindowControllerList when using the chrome.windows APIs. |
| + static WindowTypeFilter GetDefaultWindowFilter(); |
| + |
| WindowController(ui::BaseWindow* window, Profile* profile); |
| virtual ~WindowController(); |
| @@ -83,6 +94,9 @@ class WindowController { |
| // need to define this behavior. |
| virtual bool IsVisibleToExtension(const Extension* extension) const = 0; |
| + // Returns true if the window type of |controller| matches the |filter|. |
| + bool MatchesFilter(WindowTypeFilter filter) const; |
| + |
| private: |
| ui::BaseWindow* window_; |
| Profile* profile_; |