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

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

Issue 7981012: Add Mouse hover behavior to Mac Panels when minimized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr feedback Created 9 years, 3 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 08fdc1b840f598d19a66aa4f3cfea5f3407fbad2..7483b5ef2d79a5bbd36de41a2fe8171e91caf41b 100644
--- a/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm
+++ b/chrome/browser/ui/panels/panel_titlebar_view_cocoa.mm
@@ -24,7 +24,9 @@ const int kRoundedCornerSize = 3;
const int kCloseButtonLeftPadding = 8;
// Used to implement TestingAPI
-static NSEvent* MakeMouseEvent(NSEventType type, NSPoint point) {
+static NSEvent* MakeMouseEvent(NSEventType type,
+ NSPoint point,
+ int clickCount) {
return [NSEvent mouseEventWithType:type
location:point
modifierFlags:0
@@ -32,7 +34,7 @@ static NSEvent* MakeMouseEvent(NSEventType type, NSPoint point) {
windowNumber:0
context:nil
eventNumber:0
- clickCount:0
+ clickCount:clickCount
jennb 2011/09/21 21:21:26 Curious why click count is needed now?
pressure:0.0];
}
@@ -347,12 +349,12 @@ static NSEvent* MakeMouseEvent(NSEventType type, NSPoint point) {
}
- (void)pressLeftMouseButtonTitlebar {
- NSEvent* event = MakeMouseEvent(NSLeftMouseDown, NSZeroPoint);
+ NSEvent* event = MakeMouseEvent(NSLeftMouseDown, NSZeroPoint, 0);
[self mouseDown:event];
}
- (void)releaseLeftMouseButtonTitlebar {
- NSEvent* event = MakeMouseEvent(NSLeftMouseUp, NSZeroPoint);
+ NSEvent* event = MakeMouseEvent(NSLeftMouseUp, NSZeroPoint, 1);
[self mouseUp:event];
}

Powered by Google App Engine
This is Rietveld 408576698