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

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: review feedback 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
« no previous file with comments | « no previous file | chrome/browser/ui/panels/docked_panel_strip.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..41588ec50aeee7e68dbe5acf2e789becf6722db9 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,24 +23,38 @@ 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;
+
+ // 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 attention state changes.
+ virtual void OnPanelAttentionStateChanged(Panel* panel) OVERRIDE;
// Drags the given panel.
void StartDragging(Panel* panel);
@@ -49,13 +64,6 @@ class DockedPanelStrip : public PanelMouseWatcherObserver {
// Invoked when a panel's expansion state changes.
void OnPanelExpansionStateChanged(Panel* panel);
- // Invoked when a panel's attention state changes.
- void OnPanelAttentionStateChanged(Panel* panel);
-
- // Invoked when the window size of the given panel is changed.
- void OnWindowSizeChanged(
- Panel* panel, const gfx::Size& preferred_window_size);
-
// Returns true if we should bring up the titlebars, given the current mouse
// point.
bool ShouldBringUpTitlebars(int mouse_x, int mouse_y) const;
@@ -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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698