Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ui/views/cocoa/bridged_content_view.h" | 5 #import "ui/views/cocoa/bridged_content_view.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #import "base/mac/mac_util.h" | 8 #import "base/mac/mac_util.h" |
| 9 #import "base/mac/scoped_nsobject.h" | 9 #import "base/mac/scoped_nsobject.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 548 | 548 |
| 549 ui::MouseEvent event(theEvent); | 549 ui::MouseEvent event(theEvent); |
| 550 | 550 |
| 551 // Aura updates tooltips with the help of aura::Window::AddPreTargetHandler(). | 551 // Aura updates tooltips with the help of aura::Window::AddPreTargetHandler(). |
| 552 // Mac hooks in here. | 552 // Mac hooks in here. |
| 553 [self updateTooltipIfRequiredAt:event.location()]; | 553 [self updateTooltipIfRequiredAt:event.location()]; |
| 554 | 554 |
| 555 hostedView_->GetWidget()->OnMouseEvent(&event); | 555 hostedView_->GetWidget()->OnMouseEvent(&event); |
| 556 } | 556 } |
| 557 | 557 |
| 558 // http://crbug.com/646792 | |
| 559 // Disable pendingExitEvent_ logic in BaseView. | |
| 560 - (void)mouseDown:(NSEvent*)theEvent { | |
|
snake
2016/09/22 18:22:39
What about this MacViews specific fix, for now?
tapted
2016/09/23 07:10:21
The code looks good, but I tried commenting this o
snake
2016/09/26 10:28:48
hm.. I will investigate this. I did remove this fo
| |
| 561 [self mouseEvent:theEvent]; | |
| 562 } | |
| 563 | |
| 558 // NSView implementation. | 564 // NSView implementation. |
| 559 | 565 |
| 560 - (BOOL)acceptsFirstResponder { | 566 - (BOOL)acceptsFirstResponder { |
| 561 return YES; | 567 return YES; |
| 562 } | 568 } |
| 563 | 569 |
| 564 - (BOOL)becomeFirstResponder { | 570 - (BOOL)becomeFirstResponder { |
| 565 BOOL result = [super becomeFirstResponder]; | 571 BOOL result = [super becomeFirstResponder]; |
| 566 if (result && hostedView_) | 572 if (result && hostedView_) |
| 567 hostedView_->GetWidget()->GetFocusManager()->RestoreFocusedView(); | 573 hostedView_->GetWidget()->GetFocusManager()->RestoreFocusedView(); |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1356 } | 1362 } |
| 1357 | 1363 |
| 1358 return [super accessibilityAttributeValue:attribute]; | 1364 return [super accessibilityAttributeValue:attribute]; |
| 1359 } | 1365 } |
| 1360 | 1366 |
| 1361 - (id)accessibilityHitTest:(NSPoint)point { | 1367 - (id)accessibilityHitTest:(NSPoint)point { |
| 1362 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; | 1368 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; |
| 1363 } | 1369 } |
| 1364 | 1370 |
| 1365 @end | 1371 @end |
| OLD | NEW |