summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_window_controller.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/extensions/extension_window_controller.h')
-rw-r--r--chrome/browser/extensions/extension_window_controller.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/chrome/browser/extensions/extension_window_controller.h b/chrome/browser/extensions/extension_window_controller.h
index c479207..06db3c5 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_;