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