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/toolbar_controller.h" | 5 #import "chrome/browser/ui/cocoa/toolbar_controller.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
10 #include "app/l10n_util_mac.h" | 10 #include "app/l10n_util_mac.h" |
11 #include "app/mac/nsimage_cache.h" | 11 #include "app/mac/nsimage_cache.h" |
12 #include "app/menus/accelerator_cocoa.h" | 12 #include "app/menus/accelerator_cocoa.h" |
13 #include "app/menus/menu_model.h" | 13 #include "app/menus/menu_model.h" |
14 #include "app/resource_bundle.h" | 14 #include "app/resource_bundle.h" |
15 #include "base/mac_util.h" | 15 #include "base/mac/mac_util.h" |
16 #include "base/singleton.h" | 16 #include "base/singleton.h" |
17 #include "base/sys_string_conversions.h" | 17 #include "base/sys_string_conversions.h" |
18 #include "chrome/app/chrome_command_ids.h" | 18 #include "chrome/app/chrome_command_ids.h" |
19 #include "chrome/browser/autocomplete/autocomplete.h" | 19 #include "chrome/browser/autocomplete/autocomplete.h" |
20 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | 20 #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
21 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" | 21 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" |
22 #include "chrome/browser/autocomplete/autocomplete_match.h" | 22 #include "chrome/browser/autocomplete/autocomplete_match.h" |
23 #include "chrome/browser/background_page_tracker.h" | 23 #include "chrome/browser/background_page_tracker.h" |
24 #include "chrome/browser/net/url_fixer_upper.h" | 24 #include "chrome/browser/net/url_fixer_upper.h" |
25 #include "chrome/browser/prefs/pref_service.h" | 25 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 @implementation ToolbarController | 163 @implementation ToolbarController |
164 | 164 |
165 - (id)initWithModel:(ToolbarModel*)model | 165 - (id)initWithModel:(ToolbarModel*)model |
166 commands:(CommandUpdater*)commands | 166 commands:(CommandUpdater*)commands |
167 profile:(Profile*)profile | 167 profile:(Profile*)profile |
168 browser:(Browser*)browser | 168 browser:(Browser*)browser |
169 resizeDelegate:(id<ViewResizer>)resizeDelegate | 169 resizeDelegate:(id<ViewResizer>)resizeDelegate |
170 nibFileNamed:(NSString*)nibName { | 170 nibFileNamed:(NSString*)nibName { |
171 DCHECK(model && commands && profile && [nibName length]); | 171 DCHECK(model && commands && profile && [nibName length]); |
172 if ((self = [super initWithNibName:nibName | 172 if ((self = [super initWithNibName:nibName |
173 bundle:mac_util::MainAppBundle()])) { | 173 bundle:base::mac::MainAppBundle()])) { |
174 toolbarModel_ = model; | 174 toolbarModel_ = model; |
175 commands_ = commands; | 175 commands_ = commands; |
176 profile_ = profile; | 176 profile_ = profile; |
177 browser_ = browser; | 177 browser_ = browser; |
178 resizeDelegate_ = resizeDelegate; | 178 resizeDelegate_ = resizeDelegate; |
179 hasToolbar_ = YES; | 179 hasToolbar_ = YES; |
180 hasLocationBar_ = YES; | 180 hasLocationBar_ = YES; |
181 | 181 |
182 // Register for notifications about state changes for the toolbar buttons | 182 // Register for notifications about state changes for the toolbar buttons |
183 commandObserver_.reset(new CommandObserverBridge(self, commands)); | 183 commandObserver_.reset(new CommandObserverBridge(self, commands)); |
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 - (void)indicateDropURLsInView:(NSView*)view at:(NSPoint)point { | 797 - (void)indicateDropURLsInView:(NSView*)view at:(NSPoint)point { |
798 // Do nothing. | 798 // Do nothing. |
799 } | 799 } |
800 | 800 |
801 // (URLDropTargetController protocol) | 801 // (URLDropTargetController protocol) |
802 - (void)hideDropURLsIndicatorInView:(NSView*)view { | 802 - (void)hideDropURLsIndicatorInView:(NSView*)view { |
803 // Do nothing. | 803 // Do nothing. |
804 } | 804 } |
805 | 805 |
806 @end | 806 @end |
OLD | NEW |