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

Side by Side Diff: chrome/browser/cocoa/find_bar_text_field.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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/cocoa/find_bar_text_field.h" 5 #import "chrome/browser/cocoa/find_bar_text_field.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "chrome/browser/cocoa/find_bar_text_field_cell.h" 8 #import "chrome/browser/cocoa/find_bar_text_field_cell.h"
9 #import "chrome/browser/cocoa/view_id_util.h"
9 10
10 @implementation FindBarTextField 11 @implementation FindBarTextField
11 12
12 + (Class)cellClass { 13 + (Class)cellClass {
13 return [FindBarTextFieldCell class]; 14 return [FindBarTextFieldCell class];
14 } 15 }
15 16
16 - (void)awakeFromNib { 17 - (void)awakeFromNib {
17 DCHECK([[self cell] isKindOfClass:[FindBarTextFieldCell class]]); 18 DCHECK([[self cell] isKindOfClass:[FindBarTextFieldCell class]]);
18 } 19 }
19 20
20 - (FindBarTextFieldCell*)findBarTextFieldCell { 21 - (FindBarTextFieldCell*)findBarTextFieldCell {
21 DCHECK([[self cell] isKindOfClass:[FindBarTextFieldCell class]]); 22 DCHECK([[self cell] isKindOfClass:[FindBarTextFieldCell class]]);
22 return static_cast<FindBarTextFieldCell*>([self cell]); 23 return static_cast<FindBarTextFieldCell*>([self cell]);
23 } 24 }
24 25
26 // Tag is used solely for ViewID. Override to prevent changing of it.
27 - (NSInteger)tag {
28 return view_id_util::ViewIDToTag(VIEW_ID_FIND_IN_PAGE_TEXT_FIELD);
29 }
30
25 @end 31 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/extensions/browser_actions_container_view.mm ('k') | chrome/browser/cocoa/find_bar_view.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698