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

Side by Side Diff: chrome/browser/cocoa/base_view.h

Issue 1774014: Enable mouse enter/exit events for the content area on Mac (Closed)
Patch Set: Fixes drag-scroll handling Created 10 years, 7 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 | « no previous file | chrome/browser/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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 CHROME_BROWSER_COCOA_BASE_VIEW_H_ 5 #ifndef CHROME_BROWSER_COCOA_BASE_VIEW_H_
6 #define CHROME_BROWSER_COCOA_BASE_VIEW_H_ 6 #define CHROME_BROWSER_COCOA_BASE_VIEW_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/scoped_nsobject.h"
10 #include "gfx/rect.h" 11 #include "gfx/rect.h"
11 12
12 // A view that provides common functionality that many views will need: 13 // A view that provides common functionality that many views will need:
13 // - Automatic registration for mouse-moved events. 14 // - Automatic registration for mouse-moved events.
14 // - Funneling of mouse and key events to two methods 15 // - Funneling of mouse and key events to two methods
15 // - Coordinate conversion utilities 16 // - Coordinate conversion utilities
16 17
17 @interface BaseView : NSView { 18 @interface BaseView : NSView {
18 @private 19 @private
19 NSTrackingArea *trackingArea_; 20 NSTrackingArea *trackingArea_;
21 BOOL dragging_;
22 scoped_nsobject<NSEvent> pendingExitEvent_;
20 } 23 }
21 24
22 - (id)initWithFrame:(NSRect)frame; 25 - (id)initWithFrame:(NSRect)frame;
23 26
24 // Override these methods in a subclass. 27 // Override these methods in a subclass.
25 - (void)mouseEvent:(NSEvent *)theEvent; 28 - (void)mouseEvent:(NSEvent *)theEvent;
26 - (void)keyEvent:(NSEvent *)theEvent; 29 - (void)keyEvent:(NSEvent *)theEvent;
27 30
28 // Useful rect conversions (doing coordinate flipping) 31 // Useful rect conversions (doing coordinate flipping)
29 - (gfx::Rect)NSRectToRect:(NSRect)rect; 32 - (gfx::Rect)NSRectToRect:(NSRect)rect;
30 - (NSRect)RectToNSRect:(gfx::Rect)rect; 33 - (NSRect)RectToNSRect:(gfx::Rect)rect;
31 34
32 @end 35 @end
33 36
34 #endif // CHROME_BROWSER_COCOA_BASE_VIEW_H_ 37 #endif // CHROME_BROWSER_COCOA_BASE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/cocoa/base_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698