Chromium Code Reviews| Index: chrome/browser/ui/cocoa/apps/app_menu_controller_mac.h |
| diff --git a/chrome/browser/ui/cocoa/apps/app_menu_controller_mac.h b/chrome/browser/ui/cocoa/apps/app_menu_controller_mac.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bcdea2ec14f679c2976d4d6f916795d0131ac089 |
| --- /dev/null |
| +++ b/chrome/browser/ui/cocoa/apps/app_menu_controller_mac.h |
| @@ -0,0 +1,30 @@ |
| +// Copyright (c) 2013 The Chromium Authors. All rights reserved. |
|
tapted
2013/08/15 04:39:23
nit: no (c)
jackhou1
2013/08/16 02:50:41
Done.
|
| +// 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_APPS_APP_MENU_CONTROLLER_MAC_H_ |
| +#define CHROME_BROWSER_UI_COCOA_APPS_APP_MENU_CONTROLLER_MAC_H_ |
| + |
| +#import <Cocoa/Cocoa.h> |
| + |
| +#include "base/mac/scoped_nsobject.h" |
| + |
| +// This controller listens to NSWindowDidBecomeMainNotification and |
| +// NSWindowDidResignMainNotification and modifies the main menu bar to mimic a |
| +// main menu for the app. When an app window becomes main, all Chrome menu items |
| +// are hidden and menu items for the app are appended to the main menu. When the |
| +// app window resigns main, its menu items are removed and all Chrome menu items |
| +// are unhidden. |
| +@interface AppMenuController : NSObject { |
| + @private |
| + // The app id of the currently focused packaged app. |
|
tapted
2013/08/15 04:39:23
nit: maybe in the comment call it an extension id
jackhou1
2013/08/16 02:50:41
Done.
|
| + base::scoped_nsobject<NSString> appId_; |
| + // An array of items related to the currently focused packaged app. |
| + base::scoped_nsobject<NSMutableArray> appMenuItems_; |
|
tapted
2013/08/15 04:39:23
I think until we add multiple items, this should j
jackhou1
2013/08/16 02:50:41
Done.
|
| +} |
| + |
| +- (id)init; |
|
tapted
2013/08/15 04:39:23
Don't need to redeclare this, since you inherit th
jackhou1
2013/08/16 02:50:41
Done.
|
| + |
| +@end |
| + |
| +#endif // CHROME_BROWSER_UI_COCOA_APPS_APP_MENU_CONTROLLER_MAC_H_ |