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

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

Issue 456913002: MacViews: Support continuous scrolling and horizontal scrolling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for rsesek Created 6 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 | Annotate | Revision Log
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/scoped_nsobject.h" 8 #import "base/mac/scoped_nsobject.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "ui/base/ime/text_input_client.h" 10 #include "ui/base/ime/text_input_client.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 - (void)mouseMoved:(NSEvent*)theEvent { 144 - (void)mouseMoved:(NSEvent*)theEvent {
145 // Note: mouseEntered: and mouseExited: are not handled separately. 145 // Note: mouseEntered: and mouseExited: are not handled separately.
146 // |hostedView_| is responsible for converting the move events into entered 146 // |hostedView_| is responsible for converting the move events into entered
147 // and exited events for the view heirarchy. 147 // and exited events for the view heirarchy.
148 [self handleMouseEvent:theEvent]; 148 [self handleMouseEvent:theEvent];
149 } 149 }
150 150
151 - (void)scrollWheel:(NSEvent*)theEvent { 151 - (void)scrollWheel:(NSEvent*)theEvent {
152 [self handleMouseEvent:theEvent]; 152 if (!hostedView_)
153 return;
154
155 ui::MouseWheelEvent event(theEvent);
156 hostedView_->GetWidget()->OnMouseEvent(&event);
153 } 157 }
154 158
155 - (void)deleteBackward:(id)sender { 159 - (void)deleteBackward:(id)sender {
156 [self doCommandByID:IDS_DELETE_BACKWARD]; 160 [self doCommandByID:IDS_DELETE_BACKWARD];
157 } 161 }
158 162
159 - (void)deleteForward:(id)sender { 163 - (void)deleteForward:(id)sender {
160 [self doCommandByID:IDS_DELETE_FORWARD]; 164 [self doCommandByID:IDS_DELETE_FORWARD];
161 } 165 }
162 166
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 } 315 }
312 316
313 return [super accessibilityAttributeValue:attribute]; 317 return [super accessibilityAttributeValue:attribute];
314 } 318 }
315 319
316 - (id)accessibilityHitTest:(NSPoint)point { 320 - (id)accessibilityHitTest:(NSPoint)point {
317 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point]; 321 return [hostedView_->GetNativeViewAccessible() accessibilityHitTest:point];
318 } 322 }
319 323
320 @end 324 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698