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

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: Patch to reland 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
« no previous file with comments | « chrome/browser/ui/panels/panel_browsertest.cc ('k') | chrome/browser/ui/panels/panel_drag_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..df944a586e685d5958d7d40e9d3f160d675f9d53 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 was
+ // pveviously called.
+ gfx::Point last_mouse_location_;
+
DISALLOW_COPY_AND_ASSIGN(PanelDragController);
};
« no previous file with comments | « chrome/browser/ui/panels/panel_browsertest.cc ('k') | chrome/browser/ui/panels/panel_drag_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698