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

Unified Diff: chrome/browser/ui/panels/detached_panel_strip.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
Index: chrome/browser/ui/panels/detached_panel_strip.h
diff --git a/chrome/browser/ui/panels/detached_panel_strip.h b/chrome/browser/ui/panels/detached_panel_strip.h
index 51fd2a2f7ecb42b3a1ae443cca837fb37d4062fc..d7560f9a7ea02c24cfca433d1175d7084ef43938 100644
--- a/chrome/browser/ui/panels/detached_panel_strip.h
+++ b/chrome/browser/ui/panels/detached_panel_strip.h
@@ -65,7 +65,15 @@ class DetachedPanelStrip : public PanelStrip {
int num_panels() const { return panels_.size(); }
const Panels& panels() const { return panels_; }
+ // Returns default top-left to use for a detached panel whose position is
+ // not specified during panel creation.
+ gfx::Point GetDefaultPanelOrigin();
+
private:
+ // Offset the default panel top-left position by kPanelTilePixels. Wrap
+ // around to initial position if position goes beyond display area.
+ void ComputeNextDefaultPanelOrigin();
+
struct PanelPlacement {
Panel* panel;
gfx::Point position;
@@ -84,6 +92,10 @@ class DetachedPanelStrip : public PanelStrip {
// Used to save the placement information for a panel.
PanelPlacement saved_panel_placement_;
+ // Default top-left position to use for next detached panel if position is
+ // unspecified by panel creator.
+ gfx::Point default_panel_origin_;
+
DISALLOW_COPY_AND_ASSIGN(DetachedPanelStrip);
};
« no previous file with comments | « chrome/browser/ui/panels/detached_panel_browsertest.cc ('k') | chrome/browser/ui/panels/detached_panel_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698