Chromium Code Reviews| Index: chrome/browser/ui/panels/panel_manager.h |
| diff --git a/chrome/browser/ui/panels/panel_manager.h b/chrome/browser/ui/panels/panel_manager.h |
| index 45067c4d526ca5d6db51d281cf2cb75748f424ec..a2776221304e3c786b6c57c0d02a46c6e7bd5c30 100644 |
| --- a/chrome/browser/ui/panels/panel_manager.h |
| +++ b/chrome/browser/ui/panels/panel_manager.h |
| @@ -28,6 +28,11 @@ class PanelMouseWatcher; |
| class PanelManager : public DisplaySettingsProvider::DisplayAreaObserver, |
| public DisplaySettingsProvider::FullScreenObserver { |
| public: |
| + enum CreateMode { |
| + CREATE_DOCKED, // Creates a docked panel. The default. |
|
jianli
2012/09/04 21:58:47
Maybe CREATE_AS_DOCKED?
jennb
2012/09/04 23:02:44
Done.
|
| + CREATE_DETACHED // Creates a detached panel. |
| + }; |
| + |
| // Returns a single instance. |
| static PanelManager* GetInstance(); |
| @@ -38,17 +43,22 @@ class PanelManager : public DisplaySettingsProvider::DisplayAreaObserver, |
| // TODO(jennb): Delete after refactor. |
| static bool UseBrowserlessPanels(); |
| + // Returns the default top-left position for a detached panel. |
| + const gfx::Point& GetDefaultDetachedPanelOrigin(); |
| + |
| // Creates a panel and returns it. The panel might be queued for display |
| // later. |
| // |app_name| is the default title for Panels when the page content does not |
| // provide a title. For extensions, this is usually the application name |
| // generated from the extension id. |
| - // |requested_size| is the desired size for the panel, but actual |
| - // size may differ after panel layout. |
| + // |requested_bounds| is the desired bounds for the panel, but actual |
| + // bounds may differ after panel layout depending on create |mode|. |
| + // |mode| indicates whether panel should be created as docked or detached. |
| Panel* CreatePanel(const std::string& app_name, |
| Profile* profile, |
| const GURL& url, |
| - const gfx::Size& requested_size); |
| + const gfx::Rect& requested_bounds, |
| + CreateMode mode); |
| Panel* CreatePanel(Browser* browser); // legacy |
| // Close all panels (asynchronous). Panels will be removed after closing. |
| @@ -173,7 +183,8 @@ class PanelManager : public DisplaySettingsProvider::DisplayAreaObserver, |
| const std::string& app_name, |
| Profile* profile, |
| const GURL& url, |
| - const gfx::Size& requested_size); |
| + const gfx::Rect& requested_bounds, |
| + CreateMode mode); |
| // Overridden from DisplaySettingsProvider::DisplayAreaObserver: |
| virtual void OnDisplayAreaChanged(const gfx::Rect& display_area) OVERRIDE; |