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

Unified Diff: chrome/browser/cocoa/base_view.h

Issue 2973004: [Mac]Implement ViewID support. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Turns out that, it's not a good solution. Created 10 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/nibs/Toolbar.xib ('k') | chrome/browser/cocoa/base_view.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/base_view.h
diff --git a/chrome/browser/cocoa/base_view.h b/chrome/browser/cocoa/base_view.h
index d59a2c2ffbc5f225f7a750ec2405171059748098..48b36b729a8c5fb0bf2b69c54d30b62fe12b97fe 100644
--- a/chrome/browser/cocoa/base_view.h
+++ b/chrome/browser/cocoa/base_view.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,20 +8,29 @@
#import <Cocoa/Cocoa.h>
#include "base/scoped_nsobject.h"
+#include "chrome/browser/view_ids.h"
#include "gfx/rect.h"
// A view that provides common functionality that many views will need:
// - Automatic registration for mouse-moved events.
// - Funneling of mouse and key events to two methods
// - Coordinate conversion utilities
+// - ViewID support.
+//
+// We use NSView's tag property for ViewID support, BaseView class overrides
+// the tag method to return its ViewID value. So do not use the tag property
+// for other purpose in subclasses.
@interface BaseView : NSView {
@private
NSTrackingArea *trackingArea_;
BOOL dragging_;
scoped_nsobject<NSEvent> pendingExitEvent_;
+ ViewID viewID_;
}
+@property(assign, nonatomic) ViewID viewID;
+
- (id)initWithFrame:(NSRect)frame;
// Override these methods in a subclass.
« no previous file with comments | « chrome/app/nibs/Toolbar.xib ('k') | chrome/browser/cocoa/base_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698