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

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

Issue 9353002: Created new PanelStrip base class and make DockedPanelStrip and OverflowPanelStrip its subclasses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added the new files - d'oh! 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 ddcbdfab6968152df9c2aee3d608f60fbe21290f..29e78d63e1ed2758900ae56217a866e4d66328cd 100644
--- a/chrome/browser/ui/panels/docked_panel_strip.h
+++ b/chrome/browser/ui/panels/docked_panel_strip.h
@@ -12,6 +12,7 @@
#include "base/memory/weak_ptr.h"
#include "chrome/browser/ui/panels/auto_hiding_desktop_bar.h"
#include "chrome/browser/ui/panels/panel.h"
+#include "chrome/browser/ui/panels/panel_strip.h"
#include "chrome/browser/ui/panels/panel_mouse_watcher_observer.h"
#include "ui/gfx/rect.h"
@@ -22,39 +23,46 @@ class PanelManager;
// positioning the panels and controlling how they are displayed.
// Panels in the strip appear minimized, showing title-only or expanded.
// All panels in the strip are contained within the bounds of the strip.
-class DockedPanelStrip : public PanelMouseWatcherObserver {
+class DockedPanelStrip : public PanelStrip,
+ public PanelMouseWatcherObserver {
public:
typedef std::vector<Panel*> Panels;
explicit DockedPanelStrip(PanelManager* panel_manager);
virtual ~DockedPanelStrip();
- // Sets the bounds of the panel strip.
- // |area| is in screen coordinates.
- void SetDisplayArea(const gfx::Rect& area);
+ // PanelStrip OVERRIDES:
+ virtual void SetDisplayArea(const gfx::Rect& display_area) OVERRIDE;
+
+ // Rearranges the positions of the panels in the strip.
+ // Handles moving panels to/from overflow area as needed.
+ // This is called when the display space has been changed, i.e. working
+ // area being changed or a panel being closed.
+ virtual void RefreshLayout() OVERRIDE;
// Adds a panel to the strip. The panel may be a newly created panel or one
// that is transitioning from another grouping of panels.
- void AddPanel(Panel* panel);
+ virtual void AddPanel(Panel* panel) OVERRIDE;
// Returns |false| if the panel is not in the strip.
- bool Remove(Panel* panel);
- void RemoveAll();
+ virtual bool RemovePanel(Panel* panel) OVERRIDE;
+ virtual void CloseAll() OVERRIDE;
- // Drags the given panel.
- void StartDragging(Panel* panel);
- void Drag(int delta_x);
- void EndDragging(bool cancelled);
+ // Invoked when the window size of the given panel needs to be changed.
+ virtual void ResizePanelWindow(
+ Panel* panel,
+ const gfx::Size& preferred_window_size) OVERRIDE;
- // Invoked when a panel's expansion state changes.
- void OnPanelExpansionStateChanged(Panel* panel);
+ // Drags the given panel.
+ virtual void StartDragging(Panel* panel) OVERRIDE;
+ virtual void Drag(int delta_x, int delta_y) OVERRIDE;
+ virtual void EndDragging(bool cancelled) OVERRIDE;
// Invoked when a panel's attention state changes.
- void OnPanelAttentionStateChanged(Panel* panel);
+ virtual void OnPanelAttentionStateChanged(Panel* panel) OVERRIDE;
- // Invoked when the window size of the given panel is changed.
- void OnWindowSizeChanged(
- Panel* panel, const gfx::Size& preferred_window_size);
+ // Invoked when a panel's expansion state changes.
+ void OnPanelExpansionStateChanged(Panel* panel);
// Returns true if we should bring up the titlebars, given the current mouse
// point.
@@ -115,12 +123,6 @@ class DockedPanelStrip : public PanelMouseWatcherObserver {
// Returns |false| if panel is not in the strip.
bool DoRemove(Panel* panel);
- // Rearranges the positions of the panels in the strip.
- // Handles moving panels to/from overflow area as needed.
- // This is called when the display space has been changed, i.e. working
- // area being changed or a panel being closed.
- void Rearrange();
-
// Help functions to drag the given panel.
void DragLeft();
void DragRight();
« no previous file with comments | « no previous file | chrome/browser/ui/panels/docked_panel_strip.cc » ('j') | chrome/browser/ui/panels/panel_strip.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698