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

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

Issue 2718563008: mash: Use mojo for ShelfItemDelegate and [app] MenuItem. (Closed)
Patch Set: Address comments. Created 3 years, 9 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 void UpdateAppState(content::WebContents* contents, 88 void UpdateAppState(content::WebContents* contents,
89 AppState app_state) override; 89 AppState app_state) override;
90 ash::ShelfID GetShelfIDForWebContents( 90 ash::ShelfID GetShelfIDForWebContents(
91 content::WebContents* contents) override; 91 content::WebContents* contents) override;
92 void SetRefocusURLPatternForTest(ash::ShelfID id, const GURL& url) override; 92 void SetRefocusURLPatternForTest(ash::ShelfID id, const GURL& url) override;
93 ash::ShelfAction ActivateWindowOrMinimizeIfActive( 93 ash::ShelfAction ActivateWindowOrMinimizeIfActive(
94 ui::BaseWindow* window, 94 ui::BaseWindow* window,
95 bool allow_minimize) override; 95 bool allow_minimize) override;
96 void ActiveUserChanged(const std::string& user_email) override; 96 void ActiveUserChanged(const std::string& user_email) override;
97 void AdditionalUserAddedToSession(Profile* profile) override; 97 void AdditionalUserAddedToSession(Profile* profile) override;
98 ash::ShelfAppMenuItemList GetAppMenuItemsForTesting( 98 std::vector<ash::mojom::MenuItemPtr> GetAppMenuItemsForTesting(
99 const ash::ShelfItem& item) override; 99 const ash::ShelfItem& item) override;
100 std::vector<content::WebContents*> GetV1ApplicationsFromAppId( 100 std::vector<content::WebContents*> GetV1ApplicationsFromAppId(
101 const std::string& app_id) override; 101 const std::string& app_id) override;
102 void ActivateShellApp(const std::string& app_id, int window_index) override; 102 void ActivateShellApp(const std::string& app_id, int window_index) override;
103 bool IsWebContentHandledByApplication(content::WebContents* web_contents, 103 bool IsWebContentHandledByApplication(content::WebContents* web_contents,
104 const std::string& app_id) override; 104 const std::string& app_id) override;
105 bool ContentCanBeHandledByGmailApp( 105 bool ContentCanBeHandledByGmailApp(
106 content::WebContents* web_contents) override; 106 content::WebContents* web_contents) override;
107 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override; 107 gfx::Image GetAppListIcon(content::WebContents* web_contents) const override;
108 base::string16 GetAppListTitle( 108 base::string16 GetAppListTitle(
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 int FindInsertionPoint(); 237 int FindInsertionPoint();
238 238
239 // Close all windowed V1 applications of a certain extension which was already 239 // Close all windowed V1 applications of a certain extension which was already
240 // deleted. 240 // deleted.
241 void CloseWindowedAppsFromRemovedExtension(const std::string& app_id, 241 void CloseWindowedAppsFromRemovedExtension(const std::string& app_id,
242 const Profile* profile); 242 const Profile* profile);
243 243
244 // Set ShelfItemDelegate |item_delegate| for |id| and take an ownership. 244 // Set ShelfItemDelegate |item_delegate| for |id| and take an ownership.
245 // TODO(simon.hong81): Make this take a scoped_ptr of |item_delegate|. 245 // TODO(simon.hong81): Make this take a scoped_ptr of |item_delegate|.
246 void SetShelfItemDelegate(ash::ShelfID id, 246 void SetShelfItemDelegate(ash::ShelfID id,
247 ash::ShelfItemDelegate* item_delegate); 247 ash::mojom::ShelfItemDelegate* item_delegate);
248 248
249 // Forget the current profile to allow attaching to a new one. 249 // Forget the current profile to allow attaching to a new one.
250 void ReleaseProfile(); 250 void ReleaseProfile();
251 251
252 // ash::ShelfModelObserver: 252 // ash::ShelfModelObserver:
253 void ShelfItemAdded(int index) override; 253 void ShelfItemAdded(int index) override;
254 void ShelfItemRemoved(int index, ash::ShelfID id) override; 254 void ShelfItemRemoved(int index, ash::ShelfID id) override;
255 void ShelfItemMoved(int start_index, int target_index) override; 255 void ShelfItemMoved(int start_index, int target_index) override;
256 void ShelfItemChanged(int index, const ash::ShelfItem& old_item) override; 256 void ShelfItemChanged(int index, const ash::ShelfItem& old_item) override;
257 void OnSetShelfItemDelegate(ash::ShelfID id, 257 void OnSetShelfItemDelegate(
258 ash::ShelfItemDelegate* item_delegate) override; 258 ash::ShelfID id,
259 ash::mojom::ShelfItemDelegate* item_delegate) override;
259 260
260 // ash::WindowTreeHostManager::Observer: 261 // ash::WindowTreeHostManager::Observer:
261 void OnDisplayConfigurationChanged() override; 262 void OnDisplayConfigurationChanged() override;
262 263
263 // AppSyncUIStateObserver: 264 // AppSyncUIStateObserver:
264 void OnAppSyncUIStatusChanged() override; 265 void OnAppSyncUIStatusChanged() override;
265 266
266 // AppIconLoaderDelegate: 267 // AppIconLoaderDelegate:
267 void OnAppImageUpdated(const std::string& app_id, 268 void OnAppImageUpdated(const std::string& app_id,
268 const gfx::ImageSkia& image) override; 269 const gfx::ImageSkia& image) override;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 typedef std::vector<std::string> RunningAppListIds; 316 typedef std::vector<std::string> RunningAppListIds;
316 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap; 317 typedef std::map<std::string, RunningAppListIds> RunningAppListIdMap;
317 RunningAppListIdMap last_used_running_application_order_; 318 RunningAppListIdMap last_used_running_application_order_;
318 319
319 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_; 320 base::WeakPtrFactory<ChromeLauncherControllerImpl> weak_ptr_factory_;
320 321
321 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl); 322 DISALLOW_COPY_AND_ASSIGN(ChromeLauncherControllerImpl);
322 }; 323 };
323 324
324 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_ 325 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_CHROME_LAUNCHER_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698