Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Unified Diff: chrome/browser/extensions/extension_window_controller.h

Issue 10407035: Extension/Platform App window isolation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;

Powered by Google App Engine
This is Rietveld 408576698