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

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

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/browser/cocoa/base_view.h ('k') | chrome/browser/cocoa/base_view_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/base_view.mm
diff --git a/chrome/browser/cocoa/base_view.mm b/chrome/browser/cocoa/base_view.mm
index cee89511abfc416f7f6b714a93d8021ae6a0769a..60e4295645b5f6a25ae03bfc73a4e2035ad5743c 100644
--- a/chrome/browser/cocoa/base_view.mm
+++ b/chrome/browser/cocoa/base_view.mm
@@ -1,11 +1,14 @@
-// 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.
-#include "chrome/browser/cocoa/base_view.h"
+#import "chrome/browser/cocoa/base_view.h"
+#import "chrome/browser/cocoa/view_id_util.h"
@implementation BaseView
+@synthesize viewID = viewID_;
+
- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
@@ -140,4 +143,10 @@
return new_rect;
}
+// We use NSView's tag prooperty for ViewID support. Subclasses should not
+// override it for other purpose.
+- (NSInteger)tag {
+ return view_id_util::ViewIDToTag(viewID_);
+}
+
@end
« no previous file with comments | « chrome/browser/cocoa/base_view.h ('k') | chrome/browser/cocoa/base_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698