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

Unified Diff: ash/mus/shelf_delegate_mus.h

Issue 1839223003: Add basic Chrome interaction with the mash shelf. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. Created 4 years, 8 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/mus/DEPS ('k') | ash/mus/shelf_delegate_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/shelf_delegate_mus.h
diff --git a/ash/mus/shelf_delegate_mus.h b/ash/mus/shelf_delegate_mus.h
index 2c002658e5a604445131499da299ef01846fd9d8..2708df39f0d8ef42bdb24b7ebd124f8275932299 100644
--- a/ash/mus/shelf_delegate_mus.h
+++ b/ash/mus/shelf_delegate_mus.h
@@ -8,8 +8,10 @@
#include <map>
#include "ash/shelf/shelf_delegate.h"
+#include "mash/shelf/public/interfaces/shelf.mojom.h"
#include "mash/wm/public/interfaces/user_window_controller.mojom.h"
#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/interface_ptr_set.h"
namespace ash {
@@ -18,6 +20,7 @@ class ShelfModel;
namespace sysui {
class ShelfDelegateMus : public ShelfDelegate,
+ public mash::shelf::mojom::ShelfController,
public mash::wm::mojom::UserWindowObserver {
public:
explicit ShelfDelegateMus(ShelfModel* model);
@@ -36,6 +39,17 @@ class ShelfDelegateMus : public ShelfDelegate,
bool IsAppPinned(const std::string& app_id) override;
void UnpinAppWithID(const std::string& app_id) override;
+ // mash::shelf::mojom::ShelfController:
+ void AddObserver(
+ mash::shelf::mojom::ShelfObserverAssociatedPtrInfo observer) override;
+ void SetAlignment(mash::shelf::mojom::Alignment alignment) override;
+ void SetAutoHideBehavior(
+ mash::shelf::mojom::AutoHideBehavior auto_hide) override;
+ void AddItem(
+ mash::shelf::mojom::ShelfItemPtr item,
+ mash::shelf::mojom::ShelfItemDelegateAssociatedPtrInfo delegate) override;
+ void RemoveItem(const mojo::String& id) override;
+
// mash::wm::mojom::UserWindowObserver:
void OnUserWindowObserverAdded(
mojo::Array<mash::wm::mojom::UserWindowPtr> user_windows) override;
@@ -49,10 +63,14 @@ class ShelfDelegateMus : public ShelfDelegate,
ShelfModel* model_;
+ mojo::AssociatedInterfacePtrSet<mash::shelf::mojom::ShelfObserver> observers_;
+
mash::wm::mojom::UserWindowControllerPtr user_window_controller_;
mojo::Binding<mash::wm::mojom::UserWindowObserver> binding_;
std::map<uint32_t, ShelfID> window_id_to_shelf_id_;
+ std::map<std::string, ShelfID> app_id_to_shelf_id_;
+
DISALLOW_COPY_AND_ASSIGN(ShelfDelegateMus);
};
« no previous file with comments | « ash/mus/DEPS ('k') | ash/mus/shelf_delegate_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698