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

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

Issue 9616037: Change panel drag related methods to use mouse location in screen coordinates. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix mac trybot Created 8 years, 9 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_drag_controller.h
diff --git a/chrome/browser/ui/panels/panel_drag_controller.h b/chrome/browser/ui/panels/panel_drag_controller.h
index a58b7644077813d31c2cd5fda3a5ed3d4ede0079..faf30a94be2b1390796dc1b909e6b1e540085f81 100644
--- a/chrome/browser/ui/panels/panel_drag_controller.h
+++ b/chrome/browser/ui/panels/panel_drag_controller.h
@@ -19,8 +19,10 @@ class PanelDragController {
PanelDragController();
~PanelDragController();
- void StartDragging(Panel* panel);
- void Drag(int delta_x, int delta_y);
+ // Drags the given panel.
+ // |mouse_location| is in screen coordinate system.
+ void StartDragging(Panel* panel, const gfx::Point& mouse_location);
+ void Drag(const gfx::Point& mouse_location);
void EndDragging(bool cancelled);
// Asynchronous confirmation of panel having been closed.
@@ -42,6 +44,10 @@ class PanelDragController {
// dragging.
gfx::Point dragging_panel_original_position_;
+ // The mouse location, in screen coordinates, when StartDragging or Drag is
jennb 2012/03/07 00:17:46 s/is called previously/was previously called
jianli 2012/03/07 00:46:49 Done.
+ // called pveviously.
+ gfx::Point last_mouse_location_;
+
DISALLOW_COPY_AND_ASSIGN(PanelDragController);
};

Powered by Google App Engine
This is Rietveld 408576698