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

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

Issue 10021071: Remove Browser dependency in ExtensionFunctionDispatcher (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 8 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 c47920711fd61ef79844ae08f98dfd082019f12a..06db3c5b022fa620645c7a9fac02bd3288e826f0 100644
--- a/chrome/browser/extensions/extension_window_controller.h
+++ b/chrome/browser/extensions/extension_window_controller.h
@@ -12,6 +12,7 @@
#include "base/compiler_specific.h"
class BaseWindow;
+class Browser; // TODO(stevenjb) eliminate this dependency.
class GURL;
class Profile;
class SessionID;
@@ -30,31 +31,35 @@ class ExtensionWindowController {
public:
enum Reason {
REASON_NONE,
- REASON_TAB_STRIP_NOT_EDITABLE,
+ REASON_NOT_EDITABLE,
};
+
enum ProfileMatchType {
MATCH_NORMAL_ONLY,
MATCH_INCOGNITO
};
+
ExtensionWindowController(BaseWindow* window, Profile* profile);
virtual ~ExtensionWindowController();
BaseWindow* window() const { return window_; }
+ Profile* profile() const { return profile_; }
+
// Returns true if the window matches the profile.
bool MatchesProfile(Profile* profile, ProfileMatchType match_type) const;
- // Populates a dictionary for the Window object. Override this to set
- // implementation specific properties (call the base implementation first to
- // set common properties).
- virtual base::DictionaryValue* CreateWindowValue() const;
-
// Return an id uniquely identifying the window.
virtual int GetWindowId() const = 0;
// Return the type name for the window.
virtual std::string GetWindowTypeText() const = 0;
+ // Populates a dictionary for the Window object. Override this to set
+ // implementation specific properties (call the base implementation first to
+ // set common properties).
+ virtual base::DictionaryValue* CreateWindowValue() const;
+
// Populates a dictionary for the Window object, including a list of tabs.
virtual base::DictionaryValue* CreateWindowValueWithTabs() const = 0;
@@ -67,6 +72,10 @@ class ExtensionWindowController {
virtual void SetFullscreenMode(bool is_fullscreen,
const GURL& extension_url) const = 0;
+ // Returns a Browser if available. Defaults to returning NULL.
+ // TODO(stevenjb): Temporary workaround. Eliminate this.
+ virtual Browser* GetBrowser() const;
+
private:
BaseWindow* window_;
Profile* profile_;

Powered by Google App Engine
This is Rietveld 408576698