| Index: ui/base/cocoa/base_view.mm
|
| diff --git a/ui/base/cocoa/base_view.mm b/ui/base/cocoa/base_view.mm
|
| index fdc58fcb0e32334a699056b21e89ca88ed29c4d7..9642fbe1a81f3b8bf64a6853ab441af32c30194c 100644
|
| --- a/ui/base/cocoa/base_view.mm
|
| +++ b/ui/base/cocoa/base_view.mm
|
| @@ -78,6 +78,10 @@ NSString* kSelectionDirection = @"Chromium.kSelectionDirection";
|
| return kEventNotHandled;
|
| }
|
|
|
| +- (void)forceTouchEvent:(NSEvent*)theEvent {
|
| + // This method left intentionally blank.
|
| +}
|
| +
|
| - (void)mouseDown:(NSEvent*)theEvent {
|
| dragging_ = YES;
|
| [self mouseEvent:theEvent];
|
| @@ -166,6 +170,19 @@ NSString* kSelectionDirection = @"Chromium.kSelectionDirection";
|
| [super keyUp:theEvent];
|
| }
|
|
|
| +- (void)pressureChangeWithEvent:(NSEvent*)theEvent {
|
| + NSInteger newStage = [theEvent stage];
|
| + if (pressureEventStage_ == newStage)
|
| + return;
|
| +
|
| + // Call the force touch event when the stage reaches 2, which is the value
|
| + // for force touch.
|
| + if (newStage == 2) {
|
| + [self forceTouchEvent:theEvent];
|
| + }
|
| + pressureEventStage_ = newStage;
|
| +}
|
| +
|
| - (void)flagsChanged:(NSEvent*)theEvent {
|
| if ([self keyEvent:theEvent] != kEventHandled)
|
| [super flagsChanged:theEvent];
|
|
|