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

Side by Side Diff: chrome/browser/ui/cocoa/find_bar_text_field.mm

Issue 6366001: [Mac] Move the associated find bar files into a subdir of c/b/ui/cocoa/... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | Annotate | Revision Log
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/ui/cocoa/find_bar_text_field.h"
6
7 #include "base/logging.h"
8 #import "chrome/browser/ui/cocoa/find_bar_text_field_cell.h"
9 #import "chrome/browser/ui/cocoa/view_id_util.h"
10
11 @implementation FindBarTextField
12
13 + (Class)cellClass {
14 return [FindBarTextFieldCell class];
15 }
16
17 - (void)awakeFromNib {
18 DCHECK([[self cell] isKindOfClass:[FindBarTextFieldCell class]]);
19
20 [self registerForDraggedTypes:
21 [NSArray arrayWithObjects:NSStringPboardType, nil]];
22 }
23
24 - (FindBarTextFieldCell*)findBarTextFieldCell {
25 DCHECK([[self cell] isKindOfClass:[FindBarTextFieldCell class]]);
26 return static_cast<FindBarTextFieldCell*>([self cell]);
27 }
28
29 - (ViewID)viewID {
30 return VIEW_ID_FIND_IN_PAGE_TEXT_FIELD;
31 }
32
33 - (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)info {
34 // When a drag enters the text field, focus the field. This will swap in the
35 // field editor, which will then handle the drag itself.
36 [[self window] makeFirstResponder:self];
37 return NSDragOperationNone;
38 }
39
40 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/find_bar_text_field.h ('k') | chrome/browser/ui/cocoa/find_bar_text_field_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698