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

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

Issue 1186803003: Mac: Give packaged app windows their own window cycle list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase (overlap with r335812 and I want a fresh CQ run) Created 5 years, 6 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
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 #include <string>
9 10
10 #include "base/mac/scoped_nsobject.h" 11 #include "base/mac/scoped_nsobject.h"
11 12
12 @class DoppelgangerMenuItem; 13 @class DoppelgangerMenuItem;
13 14
14 // This controller listens to NSWindowDidBecomeMainNotification and 15 // This controller listens to NSWindowDidBecomeMainNotification and
15 // NSWindowDidResignMainNotification and modifies the main menu bar to mimic a 16 // NSWindowDidResignMainNotification and modifies the main menu bar to mimic a
16 // main menu for the app. When an app window becomes main, all Chrome menu items 17 // main menu for the app. When an app window becomes main, all Chrome menu items
17 // are hidden and menu items for the app are appended to the main menu. When the 18 // are hidden and menu items for the app are appended to the main menu. When the
18 // app window resigns main, its menu items are removed and all Chrome menu items 19 // app window resigns main, its menu items are removed and all Chrome menu items
19 // are unhidden. 20 // are unhidden.
20 @interface AppShimMenuController : NSObject { 21 @interface AppShimMenuController : NSObject {
21 @private 22 @private
22 // The extension id of the currently focused packaged app. 23 // The extension id of the currently focused packaged app.
23 base::scoped_nsobject<NSString> appId_; 24 std::string appId_;
24 // Items that need a doppelganger. 25 // Items that need a doppelganger.
25 base::scoped_nsobject<DoppelgangerMenuItem> aboutDoppelganger_; 26 base::scoped_nsobject<DoppelgangerMenuItem> aboutDoppelganger_;
26 base::scoped_nsobject<DoppelgangerMenuItem> hideDoppelganger_; 27 base::scoped_nsobject<DoppelgangerMenuItem> hideDoppelganger_;
27 base::scoped_nsobject<DoppelgangerMenuItem> quitDoppelganger_; 28 base::scoped_nsobject<DoppelgangerMenuItem> quitDoppelganger_;
28 base::scoped_nsobject<DoppelgangerMenuItem> newDoppelganger_; 29 base::scoped_nsobject<DoppelgangerMenuItem> newDoppelganger_;
29 base::scoped_nsobject<DoppelgangerMenuItem> openDoppelganger_; 30 base::scoped_nsobject<DoppelgangerMenuItem> openDoppelganger_;
30 base::scoped_nsobject<DoppelgangerMenuItem> closeWindowDoppelganger_; 31 base::scoped_nsobject<DoppelgangerMenuItem> closeWindowDoppelganger_;
31 base::scoped_nsobject<DoppelgangerMenuItem> allToFrontDoppelganger_; 32 base::scoped_nsobject<DoppelgangerMenuItem> allToFrontDoppelganger_;
32 // Menu items for the currently focused packaged app. 33 // Menu items for the currently focused packaged app.
33 base::scoped_nsobject<NSMenuItem> appMenuItem_; 34 base::scoped_nsobject<NSMenuItem> appMenuItem_;
34 base::scoped_nsobject<NSMenuItem> fileMenuItem_; 35 base::scoped_nsobject<NSMenuItem> fileMenuItem_;
35 base::scoped_nsobject<NSMenuItem> editMenuItem_; 36 base::scoped_nsobject<NSMenuItem> editMenuItem_;
36 base::scoped_nsobject<NSMenuItem> windowMenuItem_; 37 base::scoped_nsobject<NSMenuItem> windowMenuItem_;
37 // Additional menu items for hosted apps. 38 // Additional menu items for hosted apps.
38 base::scoped_nsobject<NSMenuItem> viewMenuItem_; 39 base::scoped_nsobject<NSMenuItem> viewMenuItem_;
39 base::scoped_nsobject<NSMenuItem> historyMenuItem_; 40 base::scoped_nsobject<NSMenuItem> historyMenuItem_;
40 } 41 }
41 42
42 @end 43 @end
43 44
44 #endif // CHROME_BROWSER_UI_COCOA_APPS_APP_SHIM_MENU_CONTROLLER_MAC_H_ 45 #endif // CHROME_BROWSER_UI_COCOA_APPS_APP_SHIM_MENU_CONTROLLER_MAC_H_
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('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