| 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 11 matching lines...) Expand all Loading... |
| 22 @class AppShimMenuController; | 22 @class AppShimMenuController; |
| 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 class ScopedKeepAlive; |
| 32 | 33 |
| 33 namespace ui { | 34 namespace ui { |
| 34 class WorkAreaWatcherObserver; | 35 class WorkAreaWatcherObserver; |
| 35 } | 36 } |
| 36 | 37 |
| 37 // The application controller object, created by loading the MainMenu nib. | 38 // The application controller object, created by loading the MainMenu nib. |
| 38 // This handles things like responding to menus when there are no windows | 39 // This handles things like responding to menus when there are no windows |
| 39 // open, etc and acts as the NSApplication delegate. | 40 // open, etc and acts as the NSApplication delegate. |
| 40 @interface AppController : NSObject<NSUserInterfaceValidations, | 41 @interface AppController : NSObject<NSUserInterfaceValidations, |
| 41 NSMenuDelegate, | 42 NSMenuDelegate, |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 | 101 |
| 101 // Responsible for maintaining all state related to the Handoff feature. | 102 // Responsible for maintaining all state related to the Handoff feature. |
| 102 base::scoped_nsobject<HandoffManager> handoffManager_; | 103 base::scoped_nsobject<HandoffManager> handoffManager_; |
| 103 | 104 |
| 104 // Observes changes to the active URL. | 105 // Observes changes to the active URL. |
| 105 scoped_ptr<HandoffActiveURLObserverBridge> | 106 scoped_ptr<HandoffActiveURLObserverBridge> |
| 106 handoff_active_url_observer_bridge_; | 107 handoff_active_url_observer_bridge_; |
| 107 | 108 |
| 108 // This will be true after receiving a NSWorkspaceWillPowerOffNotification. | 109 // This will be true after receiving a NSWorkspaceWillPowerOffNotification. |
| 109 BOOL isPoweringOff_; | 110 BOOL isPoweringOff_; |
| 111 |
| 112 // Request to keep the browser alive during that object's lifetime. |
| 113 scoped_ptr<ScopedKeepAlive> keep_alive_; |
| 110 } | 114 } |
| 111 | 115 |
| 112 @property(readonly, nonatomic) BOOL startupComplete; | 116 @property(readonly, nonatomic) BOOL startupComplete; |
| 113 @property(readonly, nonatomic) Profile* lastProfile; | 117 @property(readonly, nonatomic) Profile* lastProfile; |
| 114 | 118 |
| 115 // Helper method used to update the "Signin" menu item in the main menu and the | 119 // Helper method used to update the "Signin" menu item in the main menu and the |
| 116 // wrench menu to reflect the current signed in state. | 120 // wrench menu to reflect the current signed in state. |
| 117 + (void)updateSigninItem:(id)signinItem | 121 + (void)updateSigninItem:(id)signinItem |
| 118 shouldShow:(BOOL)showSigninMenuItem | 122 shouldShow:(BOOL)showSigninMenuItem |
| 119 currentProfile:(Profile*)profile; | 123 currentProfile:(Profile*)profile; |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 namespace app_controller_mac { | 183 namespace app_controller_mac { |
| 180 | 184 |
| 181 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in | 185 // 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 | 186 // SessionService::Observe() to get around windows/linux and mac having |
| 183 // different models of application lifetime. | 187 // different models of application lifetime. |
| 184 bool IsOpeningNewWindow(); | 188 bool IsOpeningNewWindow(); |
| 185 | 189 |
| 186 } // namespace app_controller_mac | 190 } // namespace app_controller_mac |
| 187 | 191 |
| 188 #endif | 192 #endif |
| OLD | NEW |