OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/toolbar_controller.h" | 5 #import "chrome/browser/cocoa/toolbar_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util_mac.h" | 9 #include "app/l10n_util_mac.h" |
10 #include "base/mac_util.h" | 10 #include "base/mac_util.h" |
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 return (BackgroundGradientView*)[super view]; | 470 return (BackgroundGradientView*)[super view]; |
471 } | 471 } |
472 | 472 |
473 - (id)customFieldEditorForObject:(id)obj { | 473 - (id)customFieldEditorForObject:(id)obj { |
474 if (obj == locationBar_) { | 474 if (obj == locationBar_) { |
475 // Lazilly construct Field editor, Cocoa UI code always runs on the | 475 // Lazilly construct Field editor, Cocoa UI code always runs on the |
476 // same thread, so there shoudn't be a race condition here. | 476 // same thread, so there shoudn't be a race condition here. |
477 if (autocompleteTextFieldEditor_.get() == nil) { | 477 if (autocompleteTextFieldEditor_.get() == nil) { |
478 autocompleteTextFieldEditor_.reset( | 478 autocompleteTextFieldEditor_.reset( |
479 [[AutocompleteTextFieldEditor alloc] init]); | 479 [[AutocompleteTextFieldEditor alloc] init]); |
| 480 [autocompleteTextFieldEditor_ setProfile:profile_]; |
480 } | 481 } |
481 | 482 |
482 // This needs to be called every time, otherwise notifications | 483 // This needs to be called every time, otherwise notifications |
483 // aren't sent correctly. | 484 // aren't sent correctly. |
484 DCHECK(autocompleteTextFieldEditor_.get()); | 485 DCHECK(autocompleteTextFieldEditor_.get()); |
485 [autocompleteTextFieldEditor_.get() setFieldEditor:YES]; | 486 [autocompleteTextFieldEditor_.get() setFieldEditor:YES]; |
486 return autocompleteTextFieldEditor_.get(); | 487 return autocompleteTextFieldEditor_.get(); |
487 } | 488 } |
488 return nil; | 489 return nil; |
489 } | 490 } |
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 - (void)indicateDropURLsInView:(NSView*)view at:(NSPoint)point { | 822 - (void)indicateDropURLsInView:(NSView*)view at:(NSPoint)point { |
822 // Do nothing. | 823 // Do nothing. |
823 } | 824 } |
824 | 825 |
825 // (URLDropTargetController protocol) | 826 // (URLDropTargetController protocol) |
826 - (void)hideDropURLsIndicatorInView:(NSView*)view { | 827 - (void)hideDropURLsIndicatorInView:(NSView*)view { |
827 // Do nothing. | 828 // Do nothing. |
828 } | 829 } |
829 | 830 |
830 @end | 831 @end |
OLD | NEW |