| 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> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/mac/scoped_nsobject.h" | 13 #include "base/mac/scoped_nsobject.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 16 #include "base/prefs/pref_change_registrar.h" | 16 #include "base/prefs/pref_change_registrar.h" |
| 17 #include "ui/base/work_area_watcher_observer.h" | 17 #include "ui/base/work_area_watcher_observer.h" |
| 18 | 18 |
| 19 class AppControllerProfileObserver; | 19 class AppControllerProfileObserver; |
| 20 @class AppMenuController; |
| 20 class BookmarkMenuBridge; | 21 class BookmarkMenuBridge; |
| 21 class CommandUpdater; | 22 class CommandUpdater; |
| 22 class GURL; | 23 class GURL; |
| 23 class HistoryMenuBridge; | 24 class HistoryMenuBridge; |
| 24 class Profile; | 25 class Profile; |
| 25 @class ProfileMenuController; | 26 @class ProfileMenuController; |
| 26 namespace ui { | 27 namespace ui { |
| 27 class WorkAreaWatcherObserver; | 28 class WorkAreaWatcherObserver; |
| 28 } | 29 } |
| 29 | 30 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 IBOutlet NSMenuItem* tabposeMenuItem_; | 75 IBOutlet NSMenuItem* tabposeMenuItem_; |
| 75 | 76 |
| 76 // Indicates wheter an NSPopover is currently being shown. | 77 // Indicates wheter an NSPopover is currently being shown. |
| 77 BOOL hasPopover_; | 78 BOOL hasPopover_; |
| 78 | 79 |
| 79 // Observers that listen to the work area changes. | 80 // Observers that listen to the work area changes. |
| 80 ObserverList<ui::WorkAreaWatcherObserver> workAreaChangeObservers_; | 81 ObserverList<ui::WorkAreaWatcherObserver> workAreaChangeObservers_; |
| 81 | 82 |
| 82 scoped_ptr<PrefChangeRegistrar> profilePrefRegistrar_; | 83 scoped_ptr<PrefChangeRegistrar> profilePrefRegistrar_; |
| 83 PrefChangeRegistrar localPrefRegistrar_; | 84 PrefChangeRegistrar localPrefRegistrar_; |
| 85 |
| 86 // Controller that manages main menu items for packaged app. |
| 87 base::scoped_nsobject<AppMenuController> appMenuController_; |
| 84 } | 88 } |
| 85 | 89 |
| 86 @property(readonly, nonatomic) BOOL startupComplete; | 90 @property(readonly, nonatomic) BOOL startupComplete; |
| 87 @property(readonly, nonatomic) Profile* lastProfile; | 91 @property(readonly, nonatomic) Profile* lastProfile; |
| 88 | 92 |
| 89 - (void)didEndMainMessageLoop; | 93 - (void)didEndMainMessageLoop; |
| 90 | 94 |
| 91 // Try to close all browser windows, and if that succeeds then quit. | 95 // Try to close all browser windows, and if that succeeds then quit. |
| 92 - (BOOL)tryToTerminateApplication:(NSApplication*)app; | 96 - (BOOL)tryToTerminateApplication:(NSApplication*)app; |
| 93 | 97 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 namespace app_controller_mac { | 140 namespace app_controller_mac { |
| 137 | 141 |
| 138 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in | 142 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in |
| 139 // SessionService::Observe() to get around windows/linux and mac having | 143 // SessionService::Observe() to get around windows/linux and mac having |
| 140 // different models of application lifetime. | 144 // different models of application lifetime. |
| 141 bool IsOpeningNewWindow(); | 145 bool IsOpeningNewWindow(); |
| 142 | 146 |
| 143 } // namespace app_controller_mac | 147 } // namespace app_controller_mac |
| 144 | 148 |
| 145 #endif | 149 #endif |
| OLD | NEW |