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

Side by Side Diff: chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h

Issue 23005021: Replicate standard menus for apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 7 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_COCOA_APPS_APP_SHIM_MENU_CONTROLLER_MAC_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_APPS_APP_SHIM_MENU_CONTROLLER_MAC_H_
6 #define CHROME_BROWSER_UI_COCOA_APPS_APP_SHIM_MENU_CONTROLLER_MAC_H_ 6 #define CHROME_BROWSER_UI_COCOA_APPS_APP_SHIM_MENU_CONTROLLER_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
11 11
12 // This controller listens to NSWindowDidBecomeMainNotification and 12 // This controller listens to NSWindowDidBecomeMainNotification and
13 // NSWindowDidResignMainNotification and modifies the main menu bar to mimic a 13 // NSWindowDidResignMainNotification and modifies the main menu bar to mimic a
14 // main menu for the app. When an app window becomes main, all Chrome menu items 14 // main menu for the app. When an app window becomes main, all Chrome menu items
15 // are hidden and menu items for the app are appended to the main menu. When the 15 // are hidden and menu items for the app are appended to the main menu. When the
16 // app window resigns main, its menu items are removed and all Chrome menu items 16 // app window resigns main, its menu items are removed and all Chrome menu items
17 // are unhidden. 17 // are unhidden.
18 @interface AppShimMenuController : NSObject { 18 @interface AppShimMenuController : NSObject {
19 @private 19 @private
20 // The extension id of the currently focused packaged app. 20 // The extension id of the currently focused packaged app.
21 base::scoped_nsobject<NSString> appId_; 21 base::scoped_nsobject<NSString> appId_;
22 // A reference to the "Quit Chrome" menu item. 22 // A reference to the "Quit Chrome" menu item.
23 base::scoped_nsobject<NSMenuItem> chromeMenuQuitItem_; 23 base::scoped_nsobject<NSMenuItem> chromeMenuQuitItem_;
24 // A menu item for the currently focused packaged app. 24 // Menu items for the currently focused packaged app.
25 base::scoped_nsobject<NSMenuItem> appMenuItem_; 25 base::scoped_nsobject<NSMenuItem> appMenuItem_;
26 base::scoped_nsobject<NSMenuItem> fileMenuItem_;
27 base::scoped_nsobject<NSMenuItem> editMenuItem_;
28 base::scoped_nsobject<NSMenuItem> windowMenuItem_;
26 } 29 }
27 30
28 @end 31 @end
29 32
30 #endif // CHROME_BROWSER_UI_COCOA_APPS_APP_SHIM_MENU_CONTROLLER_MAC_H_ 33 #endif // CHROME_BROWSER_UI_COCOA_APPS_APP_SHIM_MENU_CONTROLLER_MAC_H_
OLDNEW
« no previous file with comments | « chrome/app/nibs/MainMenu.xib ('k') | chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698