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

Unified Diff: chrome/browser/ui/cocoa/app_menu/app_menu_controller.h

Issue 1419993010: chrome: Rename WrenchMenuController to AppMenuController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/app_menu/app_menu_controller.h
diff --git a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h b/chrome/browser/ui/cocoa/app_menu/app_menu_controller.h
similarity index 78%
rename from chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h
rename to chrome/browser/ui/cocoa/app_menu/app_menu_controller.h
index d422faa23a70f55d6a285d9abc3a4d4830c89314..afe9db315ccf47854c166df55096321462b12a65 100644
--- a/chrome/browser/ui/cocoa/wrench_menu/wrench_menu_controller.h
+++ b/chrome/browser/ui/cocoa/app_menu/app_menu_controller.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_
-#define CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_
+#ifndef CHROME_BROWSER_UI_COCOA_APP_MENU_APP_MENU_CONTROLLER_H_
+#define CHROME_BROWSER_UI_COCOA_APP_MENU_APP_MENU_CONTROLLER_H_
#import <Cocoa/Cocoa.h>
@@ -19,21 +19,21 @@ class Browser;
@class MenuTrackedRootView;
class RecentTabsMenuModelDelegate;
@class ToolbarController;
-@class WrenchMenuButtonViewController;
+@class AppMenuButtonViewController;
class AppMenuModel;
Avi (use Gerrit) 2015/11/06 20:27:43 Alphabetize this mess. (Not your fault, I know.)
-namespace wrench_menu_controller {
-// The vertical offset of the wrench bubbles from the wrench menu button.
-extern const CGFloat kWrenchBubblePointOffsetY;
+namespace app_menu_controller {
+// The vertical offset of the app menu bubbles from the app menu button.
+extern const CGFloat kAppMenuBubblePointOffsetY;
}
-namespace WrenchMenuControllerInternal {
+namespace AppMenuControllerInternal {
class AcceleratorDelegate;
class ToolbarActionsBarObserverHelper;
class ZoomLevelObserver;
-} // namespace WrenchMenuControllerInternal
+} // namespace AppMenuControllerInternal
-// The Wrench menu has a creative layout, with buttons in menu items. There is
+// The App menu has a creative layout, with buttons in menu items. There is
Peter Kasting 2015/11/06 22:21:28 Nit: Rewrap comments
// a cross-platform model for this special menu, but on the Mac it's easier to
// get spacing and alignment precisely right using a NIB. To do that, we
// subclass the generic MenuController implementation and special-case the two
@@ -41,11 +41,11 @@ class ZoomLevelObserver;
//
// This object is owned by the ToolbarController and receives its NIB-based
// views using the shim view controller below.
-@interface WrenchMenuController
+@interface AppMenuController
: MenuController<NSMenuDelegate, HasWeakBrowserPointer> {
@private
// Used to provide accelerators for the menu.
- scoped_ptr<WrenchMenuControllerInternal::AcceleratorDelegate>
+ scoped_ptr<AppMenuControllerInternal::AcceleratorDelegate>
acceleratorDelegate_;
// The model, rebuilt each time the |-menuNeedsUpdate:|.
@@ -57,7 +57,7 @@ class ZoomLevelObserver;
// A shim NSViewController that loads the buttons from the NIB because ObjC
// doesn't have multiple inheritance as this class is a MenuController.
- base::scoped_nsobject<WrenchMenuButtonViewController> buttonViewController_;
+ base::scoped_nsobject<AppMenuButtonViewController> buttonViewController_;
// The browser for which this controller exists.
Browser* browser_; // weak
@@ -66,15 +66,15 @@ class ZoomLevelObserver;
scoped_ptr<BookmarkMenuBridge> bookmarkMenuBridge_;
// Observer for page zoom level change notifications.
- scoped_ptr<WrenchMenuControllerInternal::ZoomLevelObserver>
+ scoped_ptr<AppMenuControllerInternal::ZoomLevelObserver>
zoom_level_observer_;
// Observer for the main window's ToolbarActionsBar changing size.
- scoped_ptr<WrenchMenuControllerInternal::ToolbarActionsBarObserverHelper>
+ scoped_ptr<AppMenuControllerInternal::ToolbarActionsBarObserverHelper>
toolbar_actions_bar_observer_;
// The controller for the toolbar actions overflow that is stored in the
- // wrench menu.
+ // app menu.
// This will only be present if the extension action redesign switch is on.
base::scoped_nsobject<BrowserActionsController> browserActionsController_;
@@ -85,11 +85,11 @@ class ZoomLevelObserver;
// Designated initializer.
- (id)initWithBrowser:(Browser*)browser;
-// Used to dispatch commands from the Wrench menu. The custom items within the
+// Used to dispatch commands from the App menu. The custom items within the
// menu cannot be hooked up directly to First Responder because the window in
// which the controls reside is not the BrowserWindowController, but a
// NSCarbonMenuWindow; this screws up the typical |-commandDispatch:| system.
-- (IBAction)dispatchWrenchMenuCommand:(id)sender;
+- (IBAction)dispatchAppMenuCommand:(id)sender;
// Returns the weak reference to the AppMenuModel.
- (AppMenuModel*)appMenuModel;
@@ -109,9 +109,9 @@ class ZoomLevelObserver;
////////////////////////////////////////////////////////////////////////////////
// Shim view controller that merely unpacks objects from a NIB.
-@interface WrenchMenuButtonViewController : NSViewController {
+@interface AppMenuButtonViewController : NSViewController {
@private
- WrenchMenuController* controller_;
+ AppMenuController* controller_;
MenuTrackedRootView* editItem_;
NSButton* editCut_;
@@ -142,9 +142,9 @@ class ZoomLevelObserver;
@property(assign, nonatomic)
IBOutlet BrowserActionsContainerView* overflowActionsContainerView;
-- (id)initWithController:(WrenchMenuController*)controller;
-- (IBAction)dispatchWrenchMenuCommand:(id)sender;
+- (id)initWithController:(AppMenuController*)controller;
+- (IBAction)dispatchAppMenuCommand:(id)sender;
@end
-#endif // CHROME_BROWSER_UI_COCOA_WRENCH_MENU_WRENCH_MENU_CONTROLLER_H_
+#endif // CHROME_BROWSER_UI_COCOA_APP_MENU_APP_MENU_CONTROLLER_H_

Powered by Google App Engine
This is Rietveld 408576698