OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_APP_CONTROLLER_MAC_H_ | 5 #ifndef CHROME_BROWSER_APP_CONTROLLER_MAC_H_ |
6 #define CHROME_BROWSER_APP_CONTROLLER_MAC_H_ | 6 #define CHROME_BROWSER_APP_CONTROLLER_MAC_H_ |
7 | 7 |
8 #import <Cocoa/Cocoa.h> | 8 #import <Cocoa/Cocoa.h> |
9 | 9 |
| 10 #include "base/scoped_nsobject.h" |
| 11 #include "base/scoped_ptr.h" |
| 12 |
10 class BookmarkMenuBridge; | 13 class BookmarkMenuBridge; |
11 class CommandUpdater; | 14 class CommandUpdater; |
| 15 @class PreferencesWindowController; |
12 class Profile; | 16 class Profile; |
13 | 17 |
14 // The application controller object, created by loading the MainMenu nib. | 18 // The application controller object, created by loading the MainMenu nib. |
15 // This handles things like responding to menus when there are no windows | 19 // This handles things like responding to menus when there are no windows |
16 // open, etc and acts as the NSApplication delegate. | 20 // open, etc and acts as the NSApplication delegate. |
17 @interface AppController : NSObject<NSUserInterfaceValidations> { | 21 @interface AppController : NSObject<NSUserInterfaceValidations> { |
18 @public | |
19 CommandUpdater* menuState_; // strong ref | |
20 @private | 22 @private |
| 23 scoped_ptr<CommandUpdater> menuState_; |
21 // Management of the bookmark menu which spans across all windows | 24 // Management of the bookmark menu which spans across all windows |
22 // (and Browser*s). This is dynamically allocated to keep objc | 25 // (and Browser*s). |
23 // happy. | 26 scoped_ptr<BookmarkMenuBridge> bookmarkMenuBridge_; |
24 BookmarkMenuBridge* bookmarkMenuBridge_; | 27 scoped_nsobject<PreferencesWindowController> prefsController_; |
25 } | 28 } |
26 | 29 |
27 - (IBAction)quit:(id)sender; | 30 - (IBAction)quit:(id)sender; |
28 - (Profile*)defaultProfile; | 31 - (Profile*)defaultProfile; |
29 | 32 |
| 33 // Show the preferences window, or bring it to the front if it's already |
| 34 // visible. |
| 35 - (IBAction)showPreferences:(id)sender; |
| 36 |
30 @end | 37 @end |
31 | 38 |
32 #endif | 39 #endif |
OLD | NEW |