| 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/ui/cocoa/location_bar/autocomplete_text_field_editor.h" | 5 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.h" |
| 6 | 6 |
| 7 #include "app/l10n_util_mac.h" | 7 #include "app/l10n_util_mac.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "grit/generated_resources.h" | 9 #include "grit/generated_resources.h" |
| 10 #include "base/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| 11 #include "chrome/app/chrome_command_ids.h" // IDC_* | 11 #include "chrome/app/chrome_command_ids.h" // IDC_* |
| 12 #include "chrome/browser/browser_list.h" | 12 #include "chrome/browser/browser_list.h" |
| 13 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 13 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
| 14 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" | 14 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field.h" |
| 15 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h" | 15 #import "chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_cell.h" |
| 16 #import "chrome/browser/ui/cocoa/toolbar_controller.h" | 16 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
| 17 | 17 |
| 18 @implementation AutocompleteTextFieldEditor | 18 @implementation AutocompleteTextFieldEditor |
| 19 | 19 |
| 20 - (id)initWithFrame:(NSRect)frameRect { | 20 - (id)initWithFrame:(NSRect)frameRect { |
| 21 if ((self = [super initWithFrame:frameRect])) { | 21 if ((self = [super initWithFrame:frameRect])) { |
| 22 dropHandler_.reset([[URLDropTargetHandler alloc] initWithView:self]); | 22 dropHandler_.reset([[URLDropTargetHandler alloc] initWithView:self]); |
| 23 | 23 |
| 24 forbiddenCharacters_.reset([[NSCharacterSet controlCharacterSet] retain]); | 24 forbiddenCharacters_.reset([[NSCharacterSet controlCharacterSet] retain]); |
| 25 } | 25 } |
| 26 return self; | 26 return self; |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 - (void)mouseDown:(NSEvent*)theEvent { | 371 - (void)mouseDown:(NSEvent*)theEvent { |
| 372 // Close the popup before processing the event. | 372 // Close the popup before processing the event. |
| 373 AutocompleteTextFieldObserver* observer = [self observer]; | 373 AutocompleteTextFieldObserver* observer = [self observer]; |
| 374 if (observer) | 374 if (observer) |
| 375 observer->ClosePopup(); | 375 observer->ClosePopup(); |
| 376 | 376 |
| 377 [super mouseDown:theEvent]; | 377 [super mouseDown:theEvent]; |
| 378 } | 378 } |
| 379 | 379 |
| 380 @end | 380 @end |
| OLD | NEW |