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

Side by Side Diff: chrome/browser/cocoa/button_with_viewid.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 unified diff | Download patch
« no previous file with comments | « chrome/browser/cocoa/button_with_viewid.h ('k') | chrome/browser/cocoa/delayedmenu_button.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 #import "chrome/browser/cocoa/button_with_viewid.h"
6
7 #include "base/logging.h"
8 #import "chrome/browser/cocoa/view_id_util.h"
9
10 @implementation ButtonWithViewID
11
12 @synthesize command = command_;
13
14 // We use the tag property solely for VIewID support. So override this method
15 // to avoid misuse of the tag property.
16 - (void)setTag:(NSInteger)anInt {
17 NOTREACHED() <<
18 "NSView's tag is being used for ViewIDs. You are probably trying to use "
19 "them for some other purpose. See http://dev.chromium.org/developers/"
20 "design-documents/viewid-support-on-mac for details.";
21 }
22
23 - (void)setViewID:(ViewID)viewID {
24 // We call [super setTag:] here because it's overridden by us.
25 [super setTag:view_id_util::ViewIDToTag(viewID)];
26 }
27
28 @end // @interface ButtonWithViewID
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/button_with_viewid.h ('k') | chrome/browser/cocoa/delayedmenu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698