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

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

Issue 2193153002: MacViews: Send Mac scrollWheel NSEvents as ui::ET_SCROLL (ui::ScrollEvent). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@20160728-MacViews-ScrollLayers
Patch Set: NSDictionary subscripting Created 4 years, 2 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 | « ui/events/x/events_x.cc ('k') | ui/views/controls/scroll_view.h » ('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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 729
730 - (void)keyUp:(NSEvent*)theEvent { 730 - (void)keyUp:(NSEvent*)theEvent {
731 ui::KeyEvent event(theEvent); 731 ui::KeyEvent event(theEvent);
732 [self handleKeyEvent:&event]; 732 [self handleKeyEvent:&event];
733 } 733 }
734 734
735 - (void)scrollWheel:(NSEvent*)theEvent { 735 - (void)scrollWheel:(NSEvent*)theEvent {
736 if (!hostedView_) 736 if (!hostedView_)
737 return; 737 return;
738 738
739 ui::MouseWheelEvent event(theEvent); 739 ui::ScrollEvent event(theEvent);
740 hostedView_->GetWidget()->OnMouseEvent(&event); 740 hostedView_->GetWidget()->OnScrollEvent(&event);
741 } 741 }
742 742
743 //////////////////////////////////////////////////////////////////////////////// 743 ////////////////////////////////////////////////////////////////////////////////
744 // NSResponder Action Messages. Keep sorted according NSResponder.h (from the 744 // NSResponder Action Messages. Keep sorted according NSResponder.h (from the
745 // 10.9 SDK). The list should eventually be complete. Anything not defined will 745 // 10.9 SDK). The list should eventually be complete. Anything not defined will
746 // beep when interpretKeyEvents: would otherwise call it. 746 // beep when interpretKeyEvents: would otherwise call it.
747 // TODO(tapted): Make this list complete, except for insert* methods which are 747 // TODO(tapted): Make this list complete, except for insert* methods which are
748 // dispatched as regular key events in doCommandBySelector:. 748 // dispatched as regular key events in doCommandBySelector:.
749 749
750 // views::Textfields are single-line only, map Paragraph and Document commands 750 // views::Textfields are single-line only, map Paragraph and Document commands
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 } 1356 }
1357 1357
1358 return [super accessibilityAttributeValue:attribute]; 1358 return [super accessibilityAttributeValue:attribute];
1359 } 1359 }
1360 1360
1361 - (id)accessibilityHitTest:(NSPoint)point { 1361 - (id)accessibilityHitTest:(NSPoint)point {
1362 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; 1362 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point];
1363 } 1363 }
1364 1364
1365 @end 1365 @end
OLDNEW
« no previous file with comments | « ui/events/x/events_x.cc ('k') | ui/views/controls/scroll_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698