Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h

Issue 2325743002: arc: Disable shelf item creation when secondary user is active. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 BrowserShortcutLauncherItemController* 132 BrowserShortcutLauncherItemController*
133 GetBrowserShortcutLauncherItemController() override; 133 GetBrowserShortcutLauncherItemController() override;
134 LauncherItemController* GetLauncherItemController( 134 LauncherItemController* GetLauncherItemController(
135 const ash::ShelfID id) override; 135 const ash::ShelfID id) override;
136 bool ShelfBoundsChangesProbablyWithUser( 136 bool ShelfBoundsChangesProbablyWithUser(
137 ash::WmShelf* shelf, 137 ash::WmShelf* shelf,
138 const AccountId& account_id) const override; 138 const AccountId& account_id) const override;
139 void OnUserProfileReadyToSwitch(Profile* profile) override; 139 void OnUserProfileReadyToSwitch(Profile* profile) override;
140 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override; 140 ArcAppDeferredLauncherController* GetArcDeferredLauncher() override;
141 141
142 void SetProfileForTest(Profile* profile);
143
142 // Access to the BrowserStatusMonitor for tests. 144 // Access to the BrowserStatusMonitor for tests.
143 BrowserStatusMonitor* browser_status_monitor_for_test() { 145 BrowserStatusMonitor* browser_status_monitor_for_test() {
144 return browser_status_monitor_.get(); 146 return browser_status_monitor_.get();
145 } 147 }
146 148
147 // Access to the AppWindowLauncherController for tests. 149 // Access to the AppWindowLauncherController list for tests.
148 AppWindowLauncherController* app_window_controller_for_test() { 150 const std::vector<std::unique_ptr<AppWindowLauncherController>>&
149 return app_window_controllers_[0].get(); 151 app_window_controllers_for_test() {
152 return app_window_controllers_;
150 } 153 }
151 154
152 // ash::ShelfDelegate: 155 // ash::ShelfDelegate:
153 void OnShelfCreated(ash::WmShelf* shelf) override; 156 void OnShelfCreated(ash::WmShelf* shelf) override;
154 void OnShelfDestroyed(ash::WmShelf* shelf) override; 157 void OnShelfDestroyed(ash::WmShelf* shelf) override;
155 void OnShelfAlignmentChanged(ash::WmShelf* shelf) override; 158 void OnShelfAlignmentChanged(ash::WmShelf* shelf) override;
156 void OnShelfAutoHideBehaviorChanged(ash::WmShelf* shelf) override; 159 void OnShelfAutoHideBehaviorChanged(ash::WmShelf* shelf) override;
157 void OnShelfAutoHideStateChanged(ash::WmShelf* shelf) override; 160 void OnShelfAutoHideStateChanged(ash::WmShelf* shelf) override;
158 void OnShelfVisibilityStateChanged(ash::WmShelf* shelf) override; 161 void OnShelfVisibilityStateChanged(ash::WmShelf* shelf) override;
159 ash::ShelfID GetShelfIDForAppID(const std::string& app_id) override; 162 ash::ShelfID GetShelfIDForAppID(const std::string& app_id) override;
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // deleted. 280 // deleted.
278 void CloseWindowedAppsFromRemovedExtension(const std::string& app_id, 281 void CloseWindowedAppsFromRemovedExtension(const std::string& app_id,
279 const Profile* profile); 282 const Profile* profile);
280 283
281 // Set ShelfItemDelegate |item_delegate| for |id| and take an ownership. 284 // Set ShelfItemDelegate |item_delegate| for |id| and take an ownership.
282 // TODO(simon.hong81): Make this take a scoped_ptr of |item_delegate|. 285 // TODO(simon.hong81): Make this take a scoped_ptr of |item_delegate|.
283 void SetShelfItemDelegate(ash::ShelfID id, 286 void SetShelfItemDelegate(ash::ShelfID id,
284 ash::ShelfItemDelegate* item_delegate); 287 ash::ShelfItemDelegate* item_delegate);
285 288
286 // Attach to a specific profile. 289 // Attach to a specific profile.
287 void AttachProfile(Profile* proifile); 290 void AttachProfile(Profile* profile);
288 291
289 // Forget the current profile to allow attaching to a new one. 292 // Forget the current profile to allow attaching to a new one.
290 void ReleaseProfile(); 293 void ReleaseProfile();
291 294
292 AppIconLoader* GetAppIconLoaderForApp(const std::string& app_id); 295 AppIconLoader* GetAppIconLoaderForApp(const std::string& app_id);
293 296
294 // ash::ShelfModelObserver: 297 // ash::ShelfModelObserver:
295 void ShelfItemAdded(int index) override; 298 void ShelfItemAdded(int index) override;
296 void ShelfItemRemoved(int index, ash::ShelfID id) override; 299 void ShelfItemRemoved(int index, ash::ShelfID id) override;
297 void ShelfItemMoved(int start_index, int target_index) override; 300 void ShelfItemMoved(int start_index, int target_index) override;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 typedef std::vector<std::string> RunningAppListIds; 367 typedef std::vector<std::string> RunningAppListIds;
365 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; 368 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap;
366 RunningAppListIdMap last_used_running_application_order_; 369 RunningAppListIdMap last_used_running_application_order_;
367 370
368 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; 371 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_;
369 372
370 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); 373 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl);
371 }; 374 };
372 375
373 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ 376 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698