BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / ui / cocoa / apps / app_shim_menu_controller_mac.h
blob4a07794dd977626384b6191e6a1ec6cdbb6f6e49
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
3 // found in the LICENSE file.
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_
8 #import <Cocoa/Cocoa.h>
9 #include <string>
11 #include "base/mac/scoped_nsobject.h"
13 @class DoppelgangerMenuItem;
15 // This controller listens to NSWindowDidBecomeMainNotification and
16 // NSWindowDidResignMainNotification and modifies the main menu bar to mimic a
17 // main menu for the app. When an app window becomes main, all Chrome menu items
18 // are hidden and menu items for the app are appended to the main menu. When the
19 // app window resigns main, its menu items are removed and all Chrome menu items
20 // are unhidden.
21 @interface AppShimMenuController : NSObject {
22 @private
23 // The extension id of the currently focused packaged app.
24 std::string appId_;
25 // Items that need a doppelganger.
26 base::scoped_nsobject<DoppelgangerMenuItem> aboutDoppelganger_;
27 base::scoped_nsobject<DoppelgangerMenuItem> hideDoppelganger_;
28 base::scoped_nsobject<DoppelgangerMenuItem> quitDoppelganger_;
29 base::scoped_nsobject<DoppelgangerMenuItem> newDoppelganger_;
30 base::scoped_nsobject<DoppelgangerMenuItem> openDoppelganger_;
31 base::scoped_nsobject<DoppelgangerMenuItem> closeWindowDoppelganger_;
32 base::scoped_nsobject<DoppelgangerMenuItem> allToFrontDoppelganger_;
33 // Menu items for the currently focused packaged app.
34 base::scoped_nsobject<NSMenuItem> appMenuItem_;
35 base::scoped_nsobject<NSMenuItem> fileMenuItem_;
36 base::scoped_nsobject<NSMenuItem> editMenuItem_;
37 base::scoped_nsobject<NSMenuItem> windowMenuItem_;
38 // Additional menu items for hosted apps.
39 base::scoped_nsobject<NSMenuItem> viewMenuItem_;
40 base::scoped_nsobject<NSMenuItem> historyMenuItem_;
43 @end
45 #endif // CHROME_BROWSER_UI_COCOA_APPS_APP_SHIM_MENU_CONTROLLER_MAC_H_