OLD | NEW |
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 |
OLD | NEW |