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

Side by Side Diff: ui/base/cocoa/base_view.mm

Issue 2373733002: Send pointerleave and pointerenter events for styluses on Mac (Closed)
Patch Set: rebase Created 3 years, 10 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 | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "ui/base/cocoa/base_view.h" 5 #include "ui/base/cocoa/base_view.h"
6 6
7 #include "base/mac/mac_util.h" 7 #include "base/mac/mac_util.h"
8 8
9 NSString* kViewDidBecomeFirstResponder = 9 NSString* kViewDidBecomeFirstResponder =
10 @"Chromium.kViewDidBecomeFirstResponder"; 10 @"Chromium.kViewDidBecomeFirstResponder";
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // The default implementation of this method does not handle any key events. 75 // The default implementation of this method does not handle any key events.
76 // Derived classes should return kEventHandled if they handled an event, 76 // Derived classes should return kEventHandled if they handled an event,
77 // otherwise it will be forwarded on to |super|. 77 // otherwise it will be forwarded on to |super|.
78 return kEventNotHandled; 78 return kEventNotHandled;
79 } 79 }
80 80
81 - (void)forceTouchEvent:(NSEvent*)theEvent { 81 - (void)forceTouchEvent:(NSEvent*)theEvent {
82 // This method left intentionally blank. 82 // This method left intentionally blank.
83 } 83 }
84 84
85 - (void)tabletEvent:(NSEvent*)theEvent {
86 // This method left intentionally blank.
87 }
88
85 - (void)mouseDown:(NSEvent*)theEvent { 89 - (void)mouseDown:(NSEvent*)theEvent {
86 dragging_ = YES; 90 dragging_ = YES;
87 [self mouseEvent:theEvent]; 91 [self mouseEvent:theEvent];
88 } 92 }
89 93
90 - (void)rightMouseDown:(NSEvent*)theEvent { 94 - (void)rightMouseDown:(NSEvent*)theEvent {
91 [self mouseEvent:theEvent]; 95 [self mouseEvent:theEvent];
92 } 96 }
93 97
94 - (void)otherMouseDown:(NSEvent*)theEvent { 98 - (void)otherMouseDown:(NSEvent*)theEvent {
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 new_rect.set_y(NSHeight([self bounds]) - new_rect.bottom()); 197 new_rect.set_y(NSHeight([self bounds]) - new_rect.bottom());
194 return new_rect; 198 return new_rect;
195 } 199 }
196 200
197 - (NSRect)flipRectToNSRect:(gfx::Rect)rect { 201 - (NSRect)flipRectToNSRect:(gfx::Rect)rect {
198 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect())); 202 NSRect new_rect(NSRectFromCGRect(rect.ToCGRect()));
199 new_rect.origin.y = NSHeight([self bounds]) - NSMaxY(new_rect); 203 new_rect.origin.y = NSHeight([self bounds]) - NSMaxY(new_rect);
200 return new_rect; 204 return new_rect;
201 } 205 }
202 206
207 - (void)tabletProximity:(NSEvent*)theEvent {
208 [self tabletEvent:theEvent];
209 }
210
203 @end 211 @end
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698