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

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

Issue 9560002: Cleanup to keep panel from manipulating its panel strip assignment directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed deleted method from .h 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..149c5d0393051fc5ee8a9e586aaf8e76661796c2 100644
--- a/chrome/browser/ui/panels/docked_panel_strip.h
+++ b/chrome/browser/ui/panels/docked_panel_strip.h
@@ -43,7 +43,7 @@ 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 bool RemovePanel(Panel* panel) OVERRIDE;
+ virtual void RemovePanel(Panel* panel) OVERRIDE;
virtual void CloseAll() OVERRIDE;
virtual void ResizePanelWindow(
Panel* panel,
@@ -52,6 +52,7 @@ class DockedPanelStrip : public PanelStrip,
virtual void ActivatePanel(Panel* panel) OVERRIDE;
virtual void MinimizePanel(Panel* panel) OVERRIDE;
virtual void RestorePanel(Panel* panel) OVERRIDE;
+ virtual bool IsPanelMinimized(const Panel* panel) const OVERRIDE;
virtual bool CanShowPanelAsActive(const Panel* panel) const OVERRIDE;
virtual bool CanDragPanel(const Panel* panel) const OVERRIDE;
virtual void StartDraggingPanel(Panel* panel) OVERRIDE;
@@ -78,6 +79,7 @@ class DockedPanelStrip : public PanelStrip,
// do NOT have a temporary layout.
int num_panels() const { return panels_.size(); }
const Panels& panels() const { return panels_; }
+ Panel* last_panel() const { return panels_.empty() ? NULL : panels_.back(); }
gfx::Rect display_area() const { return display_area_; }
@@ -91,6 +93,13 @@ class DockedPanelStrip : public PanelStrip,
void OnFullScreenModeChanged(bool is_full_screen);
+ // Returns |true| if panel can fit in the dock strip.
+ bool CanFitPanel(const Panel* panel) const;
+
+ // Used to temporarily disable/re-enable layout refreshes while manipulating
+ // multiple panels at a time.
+ void enable_layout_refresh(bool enable) { layout_refresh_enabled_ = enable; }
+
#ifdef UNIT_TEST
int num_temporary_layout_panels() const {
return panels_in_temporary_layout_.size();
@@ -146,9 +155,9 @@ class DockedPanelStrip : public PanelStrip,
int minimized_panel_count_;
bool are_titlebars_up_;
- // |True| to temporarily prevent refreshing panel layout, e.g. while
+ // |False| to temporarily prevent refreshing panel layout, e.g. while
// moving panels to overflow area to make room for a panel in this strip.
- bool disable_layout_refresh_;
+ bool layout_refresh_enabled_;
// Referring to current position in |panels_| where the dragging panel
// resides.

Powered by Google App Engine
This is Rietveld 408576698