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

Unified Diff: ash/public/cpp/shelf_item_delegate.h

Issue 2833173002: mash: Support ShelfModel access in Chrome. (Closed)
Patch Set: Address comments; fix test failures. Created 3 years, 7 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: ash/public/cpp/shelf_item_delegate.h
diff --git a/ash/public/cpp/shelf_item_delegate.h b/ash/public/cpp/shelf_item_delegate.h
index 7b4dce25d882b37bca816d67b4cd687deb5c79e7..10562b1834b860d12e47a5a6640e65e6bc74cc98 100644
--- a/ash/public/cpp/shelf_item_delegate.h
+++ b/ash/public/cpp/shelf_item_delegate.h
@@ -12,6 +12,7 @@
#include "ash/public/interfaces/shelf.mojom.h"
#include "base/compiler_specific.h"
#include "base/macros.h"
+#include "mojo/public/cpp/bindings/binding.h"
#include "ui/events/event.h"
class AppWindowLauncherItemController;
@@ -37,6 +38,9 @@ class ASH_PUBLIC_EXPORT ShelfItemDelegate : public mojom::ShelfItemDelegate {
image_set_by_controller_ = image_set_by_controller;
}
+ // Returns a pointer to this instance, to be used by remote shelf models, etc.
+ mojom::ShelfItemDelegatePtr CreateInterfacePtrAndBind();
+
// Returns items for the application menu; used for convenience and testing.
virtual MenuItemList GetAppMenuItems(int event_flags);
@@ -51,6 +55,9 @@ class ASH_PUBLIC_EXPORT ShelfItemDelegate : public mojom::ShelfItemDelegate {
// identify each shelf item that has the same app_id.
ShelfID shelf_id_;
+ // A binding used by remote shelf item delegate users.
+ mojo::Binding<mojom::ShelfItemDelegate> binding_;
+
// Set to true if the launcher item image has been set by the controller.
bool image_set_by_controller_;

Powered by Google App Engine
This is Rietveld 408576698