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

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

Issue 9403035: Refactor intra-strip panel drags by introducing PanelDragController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per 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
Index: chrome/browser/ui/panels/panel_manager.h
diff --git a/chrome/browser/ui/panels/panel_manager.h b/chrome/browser/ui/panels/panel_manager.h
index 1c21b24cdee0ed919794b639d8fd6e294fd6ac92..1bef5ec9a6ad7490d01dc7092a33ccd725df28c2 100644
--- a/chrome/browser/ui/panels/panel_manager.h
+++ b/chrome/browser/ui/panels/panel_manager.h
@@ -16,9 +16,11 @@
#include "ui/gfx/rect.h"
class Browser;
-class PanelMouseWatcher;
-class OverflowPanelStrip;
+class DetachedPanelStrip;
class DockedPanelStrip;
+class OverflowPanelStrip;
+class PanelDragController;
+class PanelMouseWatcher;
// This class manages a set of panels.
class PanelManager : public AutoHidingDesktopBar::Observer {
@@ -46,7 +48,7 @@ class PanelManager : public AutoHidingDesktopBar::Observer {
// Drags the given panel.
void StartDragging(Panel* panel);
- void Drag(int delta_x);
+ void Drag(int delta_x, int delta_y);
void EndDragging(bool cancelled);
// Invoked when a panel's expansion state changes.
@@ -77,6 +79,10 @@ class PanelManager : public AutoHidingDesktopBar::Observer {
int StartingRightPosition() const;
std::vector<Panel*> panels() const;
+ PanelDragController* drag_controller() const {
+ return drag_controller_.get();
+ }
+
AutoHidingDesktopBar* auto_hiding_desktop_bar() const {
return auto_hiding_desktop_bar_;
}
@@ -85,6 +91,10 @@ class PanelManager : public AutoHidingDesktopBar::Observer {
return panel_mouse_watcher_.get();
}
+ DetachedPanelStrip* detached_strip() const {
+ return detached_strip_.get();
+ }
+
DockedPanelStrip* docked_strip() const {
return docked_strip_.get();
}
@@ -161,9 +171,12 @@ class PanelManager : public AutoHidingDesktopBar::Observer {
// Tests may want to shorten time intervals to reduce running time.
static bool shorten_time_intervals_;
+ scoped_ptr<DetachedPanelStrip> detached_strip_;
scoped_ptr<DockedPanelStrip> docked_strip_;
scoped_ptr<OverflowPanelStrip> overflow_strip_;
+ scoped_ptr<PanelDragController> drag_controller_;
+
// Use a mouse watcher to know when to bring up titlebars to "peek" at
// minimized panels. Mouse movement is only tracked when there is a minimized
// panel.

Powered by Google App Engine
This is Rietveld 408576698