Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #if defined(__OBJC__) | 8 #if defined(__OBJC__) |
| 9 | 9 |
| 10 #import <Cocoa/Cocoa.h> | 10 #import <Cocoa/Cocoa.h> |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 @class AppShimMenuController; | 21 @class AppShimMenuController; |
| 22 class BookmarkMenuBridge; | 22 class BookmarkMenuBridge; |
| 23 class CommandUpdater; | 23 class CommandUpdater; |
| 24 class GURL; | 24 class GURL; |
| 25 class HistoryMenuBridge; | 25 class HistoryMenuBridge; |
| 26 class Profile; | 26 class Profile; |
| 27 @class ProfileMenuController; | 27 @class ProfileMenuController; |
| 28 namespace ui { | 28 namespace ui { |
| 29 class WorkAreaWatcherObserver; | 29 class WorkAreaWatcherObserver; |
| 30 } | 30 } |
| 31 class QuitWithAppsController; | |
|
tapted
2014/04/01 08:09:45
nit: move to before line 28? I think there should
jackhou1
2014/04/02 06:38:38
Done.
| |
| 31 | 32 |
| 32 // The application controller object, created by loading the MainMenu nib. | 33 // The application controller object, created by loading the MainMenu nib. |
| 33 // This handles things like responding to menus when there are no windows | 34 // This handles things like responding to menus when there are no windows |
| 34 // open, etc and acts as the NSApplication delegate. | 35 // open, etc and acts as the NSApplication delegate. |
| 35 @interface AppController : NSObject<NSUserInterfaceValidations, | 36 @interface AppController : NSObject<NSUserInterfaceValidations, |
| 36 NSApplicationDelegate> { | 37 NSApplicationDelegate> { |
| 37 @private | 38 @private |
| 38 // Manages the state of the command menu items. | 39 // Manages the state of the command menu items. |
| 39 scoped_ptr<CommandUpdater> menuState_; | 40 scoped_ptr<CommandUpdater> menuState_; |
| 40 | 41 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 80 | 81 |
| 81 // If we are expecting a workspace change in response to a reopen | 82 // If we are expecting a workspace change in response to a reopen |
| 82 // event, the time we got the event. A null time otherwise. | 83 // event, the time we got the event. A null time otherwise. |
| 83 base::TimeTicks reopenTime_; | 84 base::TimeTicks reopenTime_; |
| 84 | 85 |
| 85 // Observers that listen to the work area changes. | 86 // Observers that listen to the work area changes. |
| 86 ObserverList<ui::WorkAreaWatcherObserver> workAreaChangeObservers_; | 87 ObserverList<ui::WorkAreaWatcherObserver> workAreaChangeObservers_; |
| 87 | 88 |
| 88 scoped_ptr<PrefChangeRegistrar> profilePrefRegistrar_; | 89 scoped_ptr<PrefChangeRegistrar> profilePrefRegistrar_; |
| 89 PrefChangeRegistrar localPrefRegistrar_; | 90 PrefChangeRegistrar localPrefRegistrar_; |
| 91 | |
| 92 // Displays a notification when quitting while apps are running. | |
| 93 scoped_refptr<QuitWithAppsController> quitWithAppsController_; | |
| 90 } | 94 } |
| 91 | 95 |
| 92 @property(readonly, nonatomic) BOOL startupComplete; | 96 @property(readonly, nonatomic) BOOL startupComplete; |
| 93 @property(readonly, nonatomic) Profile* lastProfile; | 97 @property(readonly, nonatomic) Profile* lastProfile; |
| 94 | 98 |
| 95 - (void)didEndMainMessageLoop; | 99 - (void)didEndMainMessageLoop; |
| 96 | 100 |
| 97 // Try to close all browser windows, and if that succeeds then quit. | 101 // Try to close all browser windows, and if that succeeds then quit. |
| 98 - (BOOL)tryToTerminateApplication:(NSApplication*)app; | 102 - (BOOL)tryToTerminateApplication:(NSApplication*)app; |
| 99 | 103 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 namespace app_controller_mac { | 150 namespace app_controller_mac { |
| 147 | 151 |
| 148 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in | 152 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in |
| 149 // SessionService::Observe() to get around windows/linux and mac having | 153 // SessionService::Observe() to get around windows/linux and mac having |
| 150 // different models of application lifetime. | 154 // different models of application lifetime. |
| 151 bool IsOpeningNewWindow(); | 155 bool IsOpeningNewWindow(); |
| 152 | 156 |
| 153 } // namespace app_controller_mac | 157 } // namespace app_controller_mac |
| 154 | 158 |
| 155 #endif | 159 #endif |
| OLD | NEW |