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

Side by Side Diff: ui/views/cocoa/bridged_content_view.mm

Issue 2337233004: MacViews: Fix sending mouse exit event and releasing capture on D&D. (Closed)
Patch Set: Fix review issues. Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | ui/views/cocoa/drag_drop_client_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | ui/views/cocoa/drag_drop_client_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698