Index: chrome/browser/extensions/extension_window_controller.h |
diff --git a/chrome/browser/extensions/extension_window_controller.h b/chrome/browser/extensions/extension_window_controller.h |
index 06db3c5b022fa620645c7a9fac02bd3288e826f0..5ced503e4146c0550435d7ec01e3a05fd8c45213 100644 |
--- a/chrome/browser/extensions/extension_window_controller.h |
+++ b/chrome/browser/extensions/extension_window_controller.h |
@@ -13,9 +13,11 @@ |
class BaseWindow; |
class Browser; // TODO(stevenjb) eliminate this dependency. |
+class Extension; |
class GURL; |
class Profile; |
class SessionID; |
+class UIThreadExtensionFunction; |
namespace base { |
class DictionaryValue; |
@@ -34,11 +36,6 @@ class ExtensionWindowController { |
REASON_NOT_EDITABLE, |
}; |
- enum ProfileMatchType { |
- MATCH_NORMAL_ONLY, |
- MATCH_INCOGNITO |
- }; |
- |
ExtensionWindowController(BaseWindow* window, Profile* profile); |
virtual ~ExtensionWindowController(); |
@@ -46,8 +43,9 @@ class ExtensionWindowController { |
Profile* profile() const { return profile_; } |
- // Returns true if the window matches the profile. |
- bool MatchesProfile(Profile* profile, ProfileMatchType match_type) const; |
+ // Returns true if the function (and the profile and extension that it was |
+ // invoked from) can operate on this window. |
+ bool IsVisibleToFunction(UIThreadExtensionFunction* function) const; |
// Return an id uniquely identifying the window. |
virtual int GetWindowId() const = 0; |
@@ -76,6 +74,9 @@ class ExtensionWindowController { |
// TODO(stevenjb): Temporary workaround. Eliminate this. |
virtual Browser* GetBrowser() const; |
+ protected: |
+ virtual bool IsVisibleToExtension(const Extension* extension) const = 0; |
+ |
private: |
BaseWindow* window_; |
Profile* profile_; |