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

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

Issue 2448173002: Fix processing of mouse events on MacViews.
Patch Set: Fix review issues. Created 4 years, 1 month 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/base/cocoa/base_view.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_BASE_COCOA_BASE_VIEW_H_ 5 #ifndef UI_BASE_COCOA_BASE_VIEW_H_
6 #define UI_BASE_COCOA_BASE_VIEW_H_ 6 #define UI_BASE_COCOA_BASE_VIEW_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 18 matching lines...) Expand all
29 ui::ScopedCrTrackingArea trackingArea_; 29 ui::ScopedCrTrackingArea trackingArea_;
30 BOOL dragging_; 30 BOOL dragging_;
31 base::scoped_nsobject<NSEvent> pendingExitEvent_; 31 base::scoped_nsobject<NSEvent> pendingExitEvent_;
32 NSInteger pressureEventStage_; 32 NSInteger pressureEventStage_;
33 } 33 }
34 34
35 // Override these methods (mouseEvent, keyEvent, forceTouchEvent) in a 35 // Override these methods (mouseEvent, keyEvent, forceTouchEvent) in a
36 // subclass. 36 // subclass.
37 - (void)mouseEvent:(NSEvent *)theEvent; 37 - (void)mouseEvent:(NSEvent *)theEvent;
38 38
39 // Passes the event to the view's superview, so it could be processed there.
40 - (void)passMouseEventToSuperview:(NSEvent*)theEvent;
41
39 // keyEvent should return kEventHandled if it handled the event, or 42 // keyEvent should return kEventHandled if it handled the event, or
40 // kEventNotHandled if it should be forwarded to BaseView's super class. 43 // kEventNotHandled if it should be forwarded to BaseView's super class.
41 - (EventHandled)keyEvent:(NSEvent *)theEvent; 44 - (EventHandled)keyEvent:(NSEvent *)theEvent;
42 45
43 - (void)forceTouchEvent:(NSEvent*)theEvent; 46 - (void)forceTouchEvent:(NSEvent*)theEvent;
44 47
45 // Useful rect conversions (doing coordinate flipping) 48 // Useful rect conversions (doing coordinate flipping)
46 - (gfx::Rect)flipNSRectToRect:(NSRect)rect; 49 - (gfx::Rect)flipNSRectToRect:(NSRect)rect;
47 - (NSRect)flipRectToNSRect:(gfx::Rect)rect; 50 - (NSRect)flipRectToNSRect:(gfx::Rect)rect;
48 51
49 @end 52 @end
50 53
51 // A notification that a view may issue when it receives first responder status. 54 // A notification that a view may issue when it receives first responder status.
52 // The name is |kViewDidBecomeFirstResponder|, the object is the view, and the 55 // The name is |kViewDidBecomeFirstResponder|, the object is the view, and the
53 // NSSelectionDirection is wrapped in an NSNumber under the key 56 // NSSelectionDirection is wrapped in an NSNumber under the key
54 // |kSelectionDirection|. 57 // |kSelectionDirection|.
55 UI_BASE_EXPORT extern NSString* kViewDidBecomeFirstResponder; 58 UI_BASE_EXPORT extern NSString* kViewDidBecomeFirstResponder;
56 UI_BASE_EXPORT extern NSString* kSelectionDirection; 59 UI_BASE_EXPORT extern NSString* kSelectionDirection;
57 60
58 #endif // UI_BASE_COCOA_BASE_VIEW_H_ 61 #endif // UI_BASE_COCOA_BASE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/base/cocoa/base_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698