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

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

Issue 2189583004: [not for review - epic CL] Adding Elastic+Momentum+Layered scrolling to views::ScrollView Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Combined rebase Created 4 years, 4 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
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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 709
710 - (void)keyUp:(NSEvent*)theEvent { 710 - (void)keyUp:(NSEvent*)theEvent {
711 ui::KeyEvent event(theEvent); 711 ui::KeyEvent event(theEvent);
712 [self handleKeyEvent:&event]; 712 [self handleKeyEvent:&event];
713 } 713 }
714 714
715 - (void)scrollWheel:(NSEvent*)theEvent { 715 - (void)scrollWheel:(NSEvent*)theEvent {
716 if (!hostedView_) 716 if (!hostedView_)
717 return; 717 return;
718 718
719 ui::MouseWheelEvent event(theEvent); 719 ui::ScrollEvent event(theEvent);
720 hostedView_->GetWidget()->OnMouseEvent(&event); 720 hostedView_->GetWidget()->OnScrollEvent(&event);
721 } 721 }
722 722
723 //////////////////////////////////////////////////////////////////////////////// 723 ////////////////////////////////////////////////////////////////////////////////
724 // NSResponder Action Messages. Keep sorted according NSResponder.h (from the 724 // NSResponder Action Messages. Keep sorted according NSResponder.h (from the
725 // 10.9 SDK). The list should eventually be complete. Anything not defined will 725 // 10.9 SDK). The list should eventually be complete. Anything not defined will
726 // beep when interpretKeyEvents: would otherwise call it. 726 // beep when interpretKeyEvents: would otherwise call it.
727 // TODO(tapted): Make this list complete, except for insert* methods which are 727 // TODO(tapted): Make this list complete, except for insert* methods which are
728 // dispatched as regular key events in doCommandBySelector:. 728 // dispatched as regular key events in doCommandBySelector:.
729 729
730 // views::Textfields are single-line only, map Paragraph and Document commands 730 // views::Textfields are single-line only, map Paragraph and Document commands
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
1288 } 1288 }
1289 1289
1290 return [super accessibilityAttributeValue:attribute]; 1290 return [super accessibilityAttributeValue:attribute];
1291 } 1291 }
1292 1292
1293 - (id)accessibilityHitTest:(NSPoint)point { 1293 - (id)accessibilityHitTest:(NSPoint)point {
1294 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; 1294 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point];
1295 } 1295 }
1296 1296
1297 @end 1297 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698