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

Unified Diff: chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm

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_titlebar_view_cocoa.mm
diff --git a/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm b/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm
index c3ff9d4fba400b489f6a9ec2c062f300129bfc30..0c93d636ec9cbbcd49a79ab8cc31fc494f00ebde 100644
--- a/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm
@@ -436,7 +436,8 @@ static NSEvent* MakeMouseEvent(NSEventType type,
return; // Don't start real drag yet.
[self startDrag];
}
- [self dragWithDeltaX:[event deltaX]];
+ [self dragWithDeltaX:[event deltaX]
+ deltaY:[event deltaY]];
break;
case NSKeyUp:
@@ -479,10 +480,12 @@ static NSEvent* MakeMouseEvent(NSEventType type,
dragState_ = PANEL_DRAG_SUPPRESSED;
}
-- (void)dragWithDeltaX:(int)deltaX {
+- (void)dragWithDeltaX:(int)deltaX
+ deltaY:(int)deltaY {
if (dragState_ != PANEL_DRAG_IN_PROGRESS)
return;
- [controller_ dragWithDeltaX:deltaX];
+ [controller_ dragWithDeltaX:deltaX
+ deltaY:deltaY];
}
- (void)drawAttention {
@@ -580,7 +583,8 @@ static NSEvent* MakeMouseEvent(NSEventType type,
deltaY:(double)delta_y {
if (dragState_ == PANEL_DRAG_CAN_START)
[self startDrag];
- [self dragWithDeltaX:delta_x];
+ [self dragWithDeltaX:delta_x
+ deltaY:delta_y];
}
- (void)cancelDragTitlebar {

Powered by Google App Engine
This is Rietveld 408576698