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 12 matching lines...) Expand all Loading... |
23 class BookmarkMenuBridge; | 23 class BookmarkMenuBridge; |
24 class CommandUpdater; | 24 class CommandUpdater; |
25 class GURL; | 25 class GURL; |
26 class HandoffActiveURLObserverBridge; | 26 class HandoffActiveURLObserverBridge; |
27 @class HandoffManager; | 27 @class HandoffManager; |
28 class HistoryMenuBridge; | 28 class HistoryMenuBridge; |
29 class Profile; | 29 class Profile; |
30 @class ProfileMenuController; | 30 @class ProfileMenuController; |
31 class QuitWithAppsController; | 31 class QuitWithAppsController; |
32 | 32 |
| 33 namespace browser_lifetime { |
| 34 class ScopedKeepAlive; |
| 35 } |
| 36 |
33 namespace ui { | 37 namespace ui { |
34 class WorkAreaWatcherObserver; | 38 class WorkAreaWatcherObserver; |
35 } | 39 } |
36 | 40 |
37 // The application controller object, created by loading the MainMenu nib. | 41 // The application controller object, created by loading the MainMenu nib. |
38 // This handles things like responding to menus when there are no windows | 42 // This handles things like responding to menus when there are no windows |
39 // open, etc and acts as the NSApplication delegate. | 43 // open, etc and acts as the NSApplication delegate. |
40 @interface AppController : NSObject<NSUserInterfaceValidations, | 44 @interface AppController : NSObject<NSUserInterfaceValidations, |
41 NSMenuDelegate, | 45 NSMenuDelegate, |
42 NSApplicationDelegate> { | 46 NSApplicationDelegate> { |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 // to it. | 89 // to it. |
86 IBOutlet NSMenu* helpMenu_; | 90 IBOutlet NSMenu* helpMenu_; |
87 | 91 |
88 // If we are expecting a workspace change in response to a reopen | 92 // If we are expecting a workspace change in response to a reopen |
89 // event, the time we got the event. A null time otherwise. | 93 // event, the time we got the event. A null time otherwise. |
90 base::TimeTicks reopenTime_; | 94 base::TimeTicks reopenTime_; |
91 | 95 |
92 // Observers that listen to the work area changes. | 96 // Observers that listen to the work area changes. |
93 base::ObserverList<ui::WorkAreaWatcherObserver> workAreaChangeObservers_; | 97 base::ObserverList<ui::WorkAreaWatcherObserver> workAreaChangeObservers_; |
94 | 98 |
| 99 // Object to keep the browser alive when there are no windows open. |
| 100 scoped_ptr<browser_lifetime::ScopedKeepAlive> keep_alive_; |
| 101 |
95 scoped_ptr<PrefChangeRegistrar> profilePrefRegistrar_; | 102 scoped_ptr<PrefChangeRegistrar> profilePrefRegistrar_; |
96 PrefChangeRegistrar localPrefRegistrar_; | 103 PrefChangeRegistrar localPrefRegistrar_; |
97 | 104 |
98 // Displays a notification when quitting while apps are running. | 105 // Displays a notification when quitting while apps are running. |
99 scoped_refptr<QuitWithAppsController> quitWithAppsController_; | 106 scoped_refptr<QuitWithAppsController> quitWithAppsController_; |
100 | 107 |
101 // Responsible for maintaining all state related to the Handoff feature. | 108 // Responsible for maintaining all state related to the Handoff feature. |
102 base::scoped_nsobject<HandoffManager> handoffManager_; | 109 base::scoped_nsobject<HandoffManager> handoffManager_; |
103 | 110 |
104 // Observes changes to the active URL. | 111 // Observes changes to the active URL. |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 185 |
179 namespace app_controller_mac { | 186 namespace app_controller_mac { |
180 | 187 |
181 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in | 188 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in |
182 // SessionService::Observe() to get around windows/linux and mac having | 189 // SessionService::Observe() to get around windows/linux and mac having |
183 // different models of application lifetime. | 190 // different models of application lifetime. |
184 bool IsOpeningNewWindow(); | 191 bool IsOpeningNewWindow(); |
185 | 192 |
186 } // namespace app_controller_mac | 193 } // namespace app_controller_mac |
187 | 194 |
188 #endif | 195 #endif // CHROME_BROWSER_APP_CONTROLLER_MAC_H_ |
OLD | NEW |