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

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

Issue 9546001: Support detaching/attaching panels via inter-strip drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/docked_panel_strip.h
diff --git a/chrome/browser/ui/panels/docked_panel_strip.h b/chrome/browser/ui/panels/docked_panel_strip.h
index 2fb002943a84d77ae1a730dd4bf1c3e73b0a1e1a..8f81ee952c49bd1028e890fd8ff7b45bd7f43c6e 100644
--- a/chrome/browser/ui/panels/docked_panel_strip.h
+++ b/chrome/browser/ui/panels/docked_panel_strip.h
@@ -43,6 +43,8 @@ class DockedPanelStrip : public PanelStrip,
// Adds a panel to the strip. The panel may be a newly created panel or one
// that is transitioning from another grouping of panels.
virtual void AddPanel(Panel* panel) OVERRIDE;
+ virtual void AddPanelAtPosition(Panel* panel,
+ const gfx::Point& position) OVERRIDE;
virtual bool RemovePanel(Panel* panel) OVERRIDE;
virtual void CloseAll() OVERRIDE;
virtual void ResizePanelWindow(
@@ -107,6 +109,11 @@ class DockedPanelStrip : public PanelStrip,
// Overridden from PanelMouseWatcherObserver:
virtual void OnMouseMove(const gfx::Point& mouse_position) OVERRIDE;
+ // Ensures that there is sufficient space in the strip to add a panel with
+ // the specified width. We might need to bump panels in the strip to make
+ // room for this panel.
+ void EnsureEnoughSpaceForPanel(int width);
+
// Keep track of the minimized panels to control mouse watching.
void IncrementMinimizedPanels();
void DecrementMinimizedPanels();
@@ -130,6 +137,10 @@ class DockedPanelStrip : public PanelStrip,
// panels are (at least briefly) visible before entering overflow.
void DelayedMovePanelToOverflow(Panel* panel);
+ // Returns next panel in the list that is placed after the given iterator.
+ // Returns NULL if the given iterator refers to the last panel in the list.
+ Panel* GetNextPanel(const Panels::iterator& iter) const;
jennb 2012/03/01 00:33:38 Is this just a wrapper for iter++?
jianli 2012/03/02 22:42:43 Yes. I removed it since it is not needed.
+
Panel* dragging_panel() const;
PanelManager* panel_manager_; // Weak, owns us.
@@ -154,9 +165,10 @@ class DockedPanelStrip : public PanelStrip,
// resides.
Panels::iterator dragging_panel_current_iterator_;
- // Referring to original position in |panels_| where the dragging panel
- // resides.
- Panels::iterator dragging_panel_original_iterator_;
+ // Panel to restore after when the drag is cancelled and the dragging panel
+ // needs to get back to its original position. If NULL, the panel will be
+ // restored at the end of the list.
+ Panel* panel_to_restore_after_on_drag_cancelled_;
jennb 2012/03/01 00:33:38 I don't understand the comment for this var.
jianli 2012/03/02 22:42:43 Per discussion, removed.
// Delayed transitions support. Sometimes transitions between minimized and
// title-only states are delayed, for better usability with Taskbars/Docks.

Powered by Google App Engine
This is Rietveld 408576698