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

Unified Diff: ash/common/shelf/shelf_model.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
« no previous file with comments | « ash/common/shelf/shelf_item_delegate.cc ('k') | ash/common/shelf/shelf_model.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/shelf_model.h
diff --git a/ash/common/shelf/shelf_model.h b/ash/common/shelf/shelf_model.h
index a5f61e806ae84da5612fcdfb6c42fff62ea72da3..6c48843eb1c15b27c0a9d87e467700f588ad4226 100644
--- a/ash/common/shelf/shelf_model.h
+++ b/ash/common/shelf/shelf_model.h
@@ -10,12 +10,12 @@
#include "ash/ash_export.h"
#include "ash/common/shelf/shelf_item_types.h"
+#include "ash/public/interfaces/shelf.mojom.h"
#include "base/macros.h"
#include "base/observer_list.h"
namespace ash {
-class ShelfItemDelegate;
class ShelfModelObserver;
// Model used for shelf items. Owns ShelfItemDelegates but does not create them.
@@ -76,11 +76,12 @@ class ASH_EXPORT ShelfModel {
int item_count() const { return static_cast<int>(items_.size()); }
// Set |item_delegate| for |id| and takes ownership.
- void SetShelfItemDelegate(ShelfID id,
- std::unique_ptr<ShelfItemDelegate> item_delegate);
+ void SetShelfItemDelegate(
+ ShelfID id,
+ std::unique_ptr<mojom::ShelfItemDelegate> item_delegate);
// Returns ShelfItemDelegate for |id|, or null if none exists.
- ShelfItemDelegate* GetShelfItemDelegate(ShelfID id);
+ mojom::ShelfItemDelegate* GetShelfItemDelegate(ShelfID id);
void AddObserver(ShelfModelObserver* observer);
void RemoveObserver(ShelfModelObserver* observer);
@@ -100,7 +101,7 @@ class ASH_EXPORT ShelfModel {
ShelfItems items_;
base::ObserverList<ShelfModelObserver> observers_;
- std::map<ShelfID, std::unique_ptr<ShelfItemDelegate>>
+ std::map<ShelfID, std::unique_ptr<mojom::ShelfItemDelegate>>
id_to_item_delegate_map_;
DISALLOW_COPY_AND_ASSIGN(ShelfModel);
« no previous file with comments | « ash/common/shelf/shelf_item_delegate.cc ('k') | ash/common/shelf/shelf_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698