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

Unified Diff: chrome/browser/cocoa/button_with_viewid.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/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/button_with_viewid.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/button_with_viewid.h
diff --git a/chrome/browser/cocoa/button_with_viewid.h b/chrome/browser/cocoa/button_with_viewid.h
new file mode 100644
index 0000000000000000000000000000000000000000..bd0719537b2661e291cf93a712ec3c3caa3d2c43
--- /dev/null
+++ b/chrome/browser/cocoa/button_with_viewid.h
@@ -0,0 +1,22 @@
+// 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.
+
+#import <Cocoa/Cocoa.h>
+#include "chrome/browser/view_ids.h"
+
+// Class for buttons that have ViewIDs.
+@interface ButtonWithViewID : NSButton {
+ @private
+ // An optional command associated to this button, such as IDC_STOP, etc.
+ int command_;
+}
+
+@property(assign, nonatomic) int command;
+
+// We use NSView's tag property for ViewID support. This method just stores
+// the ViewID to the tag property. So do not use the tag property for other
+// purpose.
+- (void)setViewID:(ViewID)viewID;
+
+@end // @interface ButtonWithViewID
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.mm ('k') | chrome/browser/cocoa/button_with_viewid.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698