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

Unified Diff: chrome/browser/ui/ash/launcher/launcher_item_controller.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/ash/launcher/launcher_item_controller.h
diff --git a/chrome/browser/ui/ash/launcher/launcher_item_controller.h b/chrome/browser/ui/ash/launcher/launcher_item_controller.h
index 5c1c538c14dbdf4f4f725dfb8cadd36c2bb90af2..57c2352def3cbb60c887f96f62c400d1a3c13253 100644
--- a/chrome/browser/ui/ash/launcher/launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/launcher_item_controller.h
@@ -7,8 +7,8 @@
#include <string>
-#include "ash/common/shelf/shelf_item_delegate.h"
#include "ash/common/shelf/shelf_item_types.h"
+#include "ash/public/interfaces/shelf.mojom.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "ui/events/event.h"
@@ -16,11 +16,13 @@
class AppWindowLauncherItemController;
class ChromeLauncherController;
+using MenuItemList = std::vector<ash::mojom::MenuItemPtr>;
+
// LauncherItemController is used by ChromeLauncherController to track one
// or more windows associated with a shelf item.
// TODO (khmel): Consider using ash::AppLauncherId instead of pair
// |app_id| and |launch_id|.
-class LauncherItemController : public ash::ShelfItemDelegate {
+class LauncherItemController : public ash::mojom::ShelfItemDelegate {
public:
LauncherItemController(const std::string& app_id,
const std::string& launch_id,
@@ -48,6 +50,9 @@ class LauncherItemController : public ash::ShelfItemDelegate {
image_set_by_controller_ = image_set_by_controller;
}
+ // Returns items for the application menu; used for convenience and testing.
+ virtual MenuItemList GetAppMenuItems(int event_flags);
+
// Returns nullptr if class is not AppWindowLauncherItemController.
virtual AppWindowLauncherItemController* AsAppWindowLauncherItemController();
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.cc ('k') | chrome/browser/ui/ash/launcher/launcher_item_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698