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 13 matching lines...) Expand all Loading... |
24 class BookmarkMenuBridge; | 24 class BookmarkMenuBridge; |
25 class CommandUpdater; | 25 class CommandUpdater; |
26 class GURL; | 26 class GURL; |
27 class HandoffActiveURLObserverBridge; | 27 class HandoffActiveURLObserverBridge; |
28 @class HandoffManager; | 28 @class HandoffManager; |
29 class HistoryMenuBridge; | 29 class HistoryMenuBridge; |
30 class Profile; | 30 class Profile; |
31 @class ProfileMenuController; | 31 @class ProfileMenuController; |
32 class QuitWithAppsController; | 32 class QuitWithAppsController; |
33 class ScopedKeepAlive; | 33 class ScopedKeepAlive; |
| 34 @class ShareMenuController; |
34 | 35 |
35 namespace ui { | 36 namespace ui { |
36 class WorkAreaWatcherObserver; | 37 class WorkAreaWatcherObserver; |
37 } | 38 } |
38 | 39 |
39 // The application controller object, created by loading the MainMenu nib. | 40 // The application controller object, created by loading the MainMenu nib. |
40 // This handles things like responding to menus when there are no windows | 41 // This handles things like responding to menus when there are no windows |
41 // open, etc and acts as the NSApplication delegate. | 42 // open, etc and acts as the NSApplication delegate. |
42 @interface AppController : NSObject<NSUserInterfaceValidations, | 43 @interface AppController : NSObject<NSUserInterfaceValidations, |
43 NSMenuDelegate, | 44 NSMenuDelegate, |
(...skipping 22 matching lines...) Expand all Loading... |
66 | 67 |
67 std::unique_ptr<HistoryMenuBridge> historyMenuBridge_; | 68 std::unique_ptr<HistoryMenuBridge> historyMenuBridge_; |
68 | 69 |
69 // Controller that manages main menu items for packaged apps. | 70 // Controller that manages main menu items for packaged apps. |
70 base::scoped_nsobject<AppShimMenuController> appShimMenuController_; | 71 base::scoped_nsobject<AppShimMenuController> appShimMenuController_; |
71 | 72 |
72 // The profile menu, which appears right before the Help menu. It is only | 73 // The profile menu, which appears right before the Help menu. It is only |
73 // available when multiple profiles is enabled. | 74 // available when multiple profiles is enabled. |
74 base::scoped_nsobject<ProfileMenuController> profileMenuController_; | 75 base::scoped_nsobject<ProfileMenuController> profileMenuController_; |
75 | 76 |
| 77 // Controller for the macOS system share menu. |
| 78 base::scoped_nsobject<ShareMenuController> shareMenuController_; |
| 79 |
76 // If we're told to open URLs (in particular, via |-application:openFiles:| by | 80 // If we're told to open URLs (in particular, via |-application:openFiles:| by |
77 // Launch Services) before we've launched the browser, we queue them up in | 81 // Launch Services) before we've launched the browser, we queue them up in |
78 // |startupUrls_| so that they can go in the first browser window/tab. | 82 // |startupUrls_| so that they can go in the first browser window/tab. |
79 std::vector<GURL> startupUrls_; | 83 std::vector<GURL> startupUrls_; |
80 BOOL startupComplete_; | 84 BOOL startupComplete_; |
81 | 85 |
82 // Outlets for the close tab/window menu items so that we can adjust the | 86 // Outlets for the close tab/window menu items so that we can adjust the |
83 // commmand-key equivalent depending on the kind of window and how many | 87 // commmand-key equivalent depending on the kind of window and how many |
84 // tabs it has. | 88 // tabs it has. |
85 IBOutlet NSMenuItem* closeTabMenuItem_; | 89 IBOutlet NSMenuItem* closeTabMenuItem_; |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 namespace app_controller_mac { | 191 namespace app_controller_mac { |
188 | 192 |
189 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in | 193 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in |
190 // SessionService::Observe() to get around windows/linux and mac having | 194 // SessionService::Observe() to get around windows/linux and mac having |
191 // different models of application lifetime. | 195 // different models of application lifetime. |
192 bool IsOpeningNewWindow(); | 196 bool IsOpeningNewWindow(); |
193 | 197 |
194 } // namespace app_controller_mac | 198 } // namespace app_controller_mac |
195 | 199 |
196 #endif // CHROME_BROWSER_APP_CONTROLLER_MAC_H_ | 200 #endif // CHROME_BROWSER_APP_CONTROLLER_MAC_H_ |
OLD | NEW |