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

Side by Side Diff: chrome/browser/cocoa/location_bar/autocomplete_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
« no previous file with comments | « chrome/browser/cocoa/find_bar_view.mm ('k') | chrome/browser/cocoa/menu_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
1 // Copyright (c) 2010 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/location_bar/autocomplete_text_field.h" 5 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #import "chrome/browser/cocoa/browser_window_controller.h" 8 #import "chrome/browser/cocoa/browser_window_controller.h"
9 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h" 9 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field_cell.h"
10 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field_editor.h" 10 #import "chrome/browser/cocoa/location_bar/autocomplete_text_field_editor.h"
11 #import "chrome/browser/cocoa/toolbar_controller.h" 11 #import "chrome/browser/cocoa/toolbar_controller.h"
12 #import "chrome/browser/cocoa/url_drop_target.h" 12 #import "chrome/browser/cocoa/url_drop_target.h"
13 #import "chrome/browser/cocoa/view_id_util.h"
13 14
14 @implementation AutocompleteTextField 15 @implementation AutocompleteTextField
15 16
16 @synthesize observer = observer_; 17 @synthesize observer = observer_;
17 18
18 + (Class)cellClass { 19 + (Class)cellClass {
19 return [AutocompleteTextFieldCell class]; 20 return [AutocompleteTextFieldCell class];
20 } 21 }
21 22
22 - (void)dealloc { 23 - (void)dealloc {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // (URLDropTarget protocol) 399 // (URLDropTarget protocol)
399 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender { 400 - (BOOL)performDragOperation:(id<NSDraggingInfo>)sender {
400 return [dropHandler_ performDragOperation:sender]; 401 return [dropHandler_ performDragOperation:sender];
401 } 402 }
402 403
403 - (NSMenu*)actionMenuForEvent:(NSEvent*)event { 404 - (NSMenu*)actionMenuForEvent:(NSEvent*)event {
404 return [[self autocompleteTextFieldCell] 405 return [[self autocompleteTextFieldCell]
405 actionMenuForEvent:event inRect:[self bounds] ofView:self]; 406 actionMenuForEvent:event inRect:[self bounds] ofView:self];
406 } 407 }
407 408
409 // Tag is used solely for ViewID. Override to prevent changing of it.
410 - (NSInteger)tag {
411 return view_id_util::ViewIDToTag(VIEW_ID_LOCATION_BAR);
412 }
408 @end 413 @end
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/find_bar_view.mm ('k') | chrome/browser/cocoa/menu_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698