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

Side by Side Diff: chrome/browser/ui/cocoa/chrome_tracking_area.h

Issue 6486002: [Mac] Create CrTrackingArea and use it in TabStripController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_COCOA_CHROME_TRACKING_AREA_H_
6 #define CHROME_BROWSER_UI_COCOA_CHROME_TRACKING_AREA_H_
7
8 #import <AppKit/AppKit.h>
9
10 #include "base/scoped_nsobject.h"
11
12 @class CrTrackingAreaOwnerProxy;
13
14 // The CrTrackingArea can be used in place of an NSTrackingArea to shut off
15 // messaging to the |owner| at a specific point in time.
16 @interface CrTrackingArea : NSTrackingArea {
17 @private
18 scoped_nsobject<CrTrackingAreaOwnerProxy> ownerProxy_;
Scott Hess - ex-Googler 2011/02/11 01:17:12 Rather than using |ownerProxy_|, you can override
Robert Sesek 2011/02/11 02:30:50 I went with this approach because it affords us be
Robert Sesek 2011/02/11 19:53:58 Switched to this approach. Closer examination show
Scott Hess - ex-Googler 2011/02/11 20:08:19 AFAICT from tracing messages, -mouseMoved: calls -
19 }
20
21 // Designated initializer. Forwards all arguments to the superclass, but wraps
22 // |owner| in a proxy object.
23 - (id)initWithRect:(NSRect)rect
24 options:(NSTrackingAreaOptions)options
25 owner:(id)owner
26 userInfo:(NSDictionary*)userInfo;
27
28 // Prevents any future messages from being delivered to the |owner|.
29 - (void)clearOwner;
30
31 // Watches |window| for its NSWindowWillCloseNotification and calls
32 // |-clearOwner| when the notification is observed.
33 - (void)clearOwnerWhenWindowWillClose:(NSWindow*)window;
34
35 @end
36
37 #endif // CHROME_BROWSER_UI_COCOA_CHROME_TRACKING_AREA_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/chrome_tracking_area.mm » ('j') | chrome/browser/ui/cocoa/chrome_tracking_area.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698