Chromium Code Reviews| 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]; |
| } |