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. |