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/files/file_path.h" |
13 #include "base/mac/scoped_nsobject.h" | 14 #include "base/mac/scoped_nsobject.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
16 #include "base/prefs/pref_change_registrar.h" | 17 #include "base/prefs/pref_change_registrar.h" |
17 #include "base/time/time.h" | 18 #include "base/time/time.h" |
18 #include "ui/base/work_area_watcher_observer.h" | 19 #include "ui/base/work_area_watcher_observer.h" |
19 | 20 |
20 class AppControllerProfileObserver; | 21 class AppControllerProfileObserver; |
21 @class AppShimMenuController; | 22 @class AppShimMenuController; |
22 class BookmarkMenuBridge; | 23 class BookmarkMenuBridge; |
(...skipping 27 matching lines...) Expand all Loading... |
50 // The ProfileObserver observes the ProfileInfoCache and gets notified | 51 // The ProfileObserver observes the ProfileInfoCache and gets notified |
51 // when a profile has been deleted. | 52 // when a profile has been deleted. |
52 scoped_ptr<AppControllerProfileObserver> profileInfoCacheObserver_; | 53 scoped_ptr<AppControllerProfileObserver> profileInfoCacheObserver_; |
53 | 54 |
54 // Management of the bookmark menu which spans across all windows | 55 // Management of the bookmark menu which spans across all windows |
55 // (and Browser*s). |profileBookmarkMenuBridgeMap_| is a cache that owns one | 56 // (and Browser*s). |profileBookmarkMenuBridgeMap_| is a cache that owns one |
56 // pointer to a BookmarkMenuBridge for each profile. |bookmarkMenuBridge_| is | 57 // pointer to a BookmarkMenuBridge for each profile. |bookmarkMenuBridge_| is |
57 // a weak pointer that is updated to match the corresponding cache entry | 58 // a weak pointer that is updated to match the corresponding cache entry |
58 // during a profile switch. | 59 // during a profile switch. |
59 BookmarkMenuBridge* bookmarkMenuBridge_; | 60 BookmarkMenuBridge* bookmarkMenuBridge_; |
60 std::map<Profile*, BookmarkMenuBridge*> profileBookmarkMenuBridgeMap_; | 61 std::map<base::FilePath, BookmarkMenuBridge*> profileBookmarkMenuBridgeMap_; |
61 | 62 |
62 scoped_ptr<HistoryMenuBridge> historyMenuBridge_; | 63 scoped_ptr<HistoryMenuBridge> historyMenuBridge_; |
63 | 64 |
64 // Controller that manages main menu items for packaged apps. | 65 // Controller that manages main menu items for packaged apps. |
65 base::scoped_nsobject<AppShimMenuController> appShimMenuController_; | 66 base::scoped_nsobject<AppShimMenuController> appShimMenuController_; |
66 | 67 |
67 // The profile menu, which appears right before the Help menu. It is only | 68 // The profile menu, which appears right before the Help menu. It is only |
68 // available when multiple profiles is enabled. | 69 // available when multiple profiles is enabled. |
69 base::scoped_nsobject<ProfileMenuController> profileMenuController_; | 70 base::scoped_nsobject<ProfileMenuController> profileMenuController_; |
70 | 71 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 namespace app_controller_mac { | 178 namespace app_controller_mac { |
178 | 179 |
179 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in | 180 // True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in |
180 // SessionService::Observe() to get around windows/linux and mac having | 181 // SessionService::Observe() to get around windows/linux and mac having |
181 // different models of application lifetime. | 182 // different models of application lifetime. |
182 bool IsOpeningNewWindow(); | 183 bool IsOpeningNewWindow(); |
183 | 184 |
184 } // namespace app_controller_mac | 185 } // namespace app_controller_mac |
185 | 186 |
186 #endif | 187 #endif |
OLD | NEW |