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

Unified Diff: chrome/browser/ui/panels/panel_manager.h

Issue 10919046: Allow panels to be created as detached panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid panel_create_mode being unused_var in Ash Created 8 years, 3 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
« no previous file with comments | « chrome/browser/ui/panels/panel_cocoa_unittest.mm ('k') | chrome/browser/ui/panels/panel_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..24c2a9a7209e9f541f1fbe39a1141d16788726f7 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_AS_DOCKED, // Creates a docked panel. The default.
+ CREATE_AS_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.
+ 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;
« no previous file with comments | « chrome/browser/ui/panels/panel_cocoa_unittest.mm ('k') | chrome/browser/ui/panels/panel_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698