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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm

Issue 10833056: Add a menu to the Action Box Button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/toolbar_controller.h" 5 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
11 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
12 #include "base/string_util.h" 12 #include "base/string_util.h"
13 #include "base/sys_string_conversions.h" 13 #include "base/sys_string_conversions.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/app/chrome_command_ids.h" 15 #include "chrome/app/chrome_command_ids.h"
16 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 16 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
17 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" 17 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
18 #include "chrome/browser/autocomplete/autocomplete_match.h" 18 #include "chrome/browser/autocomplete/autocomplete_match.h"
19 #include "chrome/browser/command_updater.h" 19 #include "chrome/browser/command_updater.h"
20 #include "chrome/browser/extensions/extension_service.h"
21 #include "chrome/browser/extensions/extension_system.h"
Scott Hess - ex-Googler 2012/07/27 20:31:06 Looks like this file can be reverted out of the CL
beaudoin 2012/08/01 02:23:26 Done.
20 #include "chrome/browser/net/url_fixer_upper.h" 22 #include "chrome/browser/net/url_fixer_upper.h"
21 #include "chrome/browser/prefs/pref_service.h" 23 #include "chrome/browser/prefs/pref_service.h"
22 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
23 #include "chrome/browser/search_engines/template_url_service.h" 25 #include "chrome/browser/search_engines/template_url_service.h"
24 #include "chrome/browser/themes/theme_service.h" 26 #include "chrome/browser/themes/theme_service.h"
25 #include "chrome/browser/ui/browser.h" 27 #include "chrome/browser/ui/browser.h"
26 #include "chrome/browser/ui/browser_tabstrip.h" 28 #include "chrome/browser/ui/browser_tabstrip.h"
27 #include "chrome/browser/ui/browser_window.h" 29 #include "chrome/browser/ui/browser_window.h"
28 #import "chrome/browser/ui/cocoa/background_gradient_view.h" 30 #import "chrome/browser/ui/cocoa/background_gradient_view.h"
29 #include "chrome/browser/ui/cocoa/drag_util.h" 31 #include "chrome/browser/ui/cocoa/drag_util.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 // Register pref observers for the optional home and page/options buttons 275 // Register pref observers for the optional home and page/options buttons
274 // and then add them to the toolbar based on those prefs. 276 // and then add them to the toolbar based on those prefs.
275 notificationBridge_.reset( 277 notificationBridge_.reset(
276 new ToolbarControllerInternal::NotificationBridge(self)); 278 new ToolbarControllerInternal::NotificationBridge(self));
277 PrefService* prefs = profile_->GetPrefs(); 279 PrefService* prefs = profile_->GetPrefs();
278 showHomeButton_.Init(prefs::kShowHomeButton, prefs, 280 showHomeButton_.Init(prefs::kShowHomeButton, prefs,
279 notificationBridge_.get()); 281 notificationBridge_.get());
280 [self showOptionalHomeButton]; 282 [self showOptionalHomeButton];
281 [self installWrenchMenu]; 283 [self installWrenchMenu];
282 284
285
283 // Create the controllers for the back/forward menus. 286 // Create the controllers for the back/forward menus.
284 backMenuController_.reset([[BackForwardMenuController alloc] 287 backMenuController_.reset([[BackForwardMenuController alloc]
285 initWithBrowser:browser_ 288 initWithBrowser:browser_
286 modelType:BACK_FORWARD_MENU_TYPE_BACK 289 modelType:BACK_FORWARD_MENU_TYPE_BACK
287 button:backButton_]); 290 button:backButton_]);
288 forwardMenuController_.reset([[BackForwardMenuController alloc] 291 forwardMenuController_.reset([[BackForwardMenuController alloc]
289 initWithBrowser:browser_ 292 initWithBrowser:browser_
290 modelType:BACK_FORWARD_MENU_TYPE_FORWARD 293 modelType:BACK_FORWARD_MENU_TYPE_FORWARD
291 button:forwardButton_]); 294 button:forwardButton_]);
292 295
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 - (void)hideDropURLsIndicatorInView:(NSView*)view { 799 - (void)hideDropURLsIndicatorInView:(NSView*)view {
797 // Do nothing. 800 // Do nothing.
798 } 801 }
799 802
800 // (URLDropTargetController protocol) 803 // (URLDropTargetController protocol)
801 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info { 804 - (BOOL)isUnsupportedDropData:(id<NSDraggingInfo>)info {
802 return drag_util::IsUnsupportedDropData(profile_, info); 805 return drag_util::IsUnsupportedDropData(profile_, info);
803 } 806 }
804 807
805 @end 808 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698