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

Unified Diff: ash/mus/shell_delegate_mus.cc

Issue 2259153002: mash: Port ash_sysui ShelfDelegateMus impl to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Destroy the window manager app before tearing down MD controllers. Created 4 years, 4 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/mus/shell_delegate_mus.cc
diff --git a/ash/mus/shell_delegate_mus.cc b/ash/mus/shell_delegate_mus.cc
index d82d9baeb1e8cd69bdba9b9dafefe6fdeb7a65a0..b21edc07cbd0cfda8c9eef1d195b04a1c9d12c18 100644
--- a/ash/mus/shell_delegate_mus.cc
+++ b/ash/mus/shell_delegate_mus.cc
@@ -11,10 +11,11 @@
#include "ash/common/palette_delegate.h"
#include "ash/common/pointer_watcher_delegate.h"
#include "ash/common/session/session_state_delegate.h"
-#include "ash/common/shelf/shelf_delegate.h"
#include "ash/common/system/tray/default_system_tray_delegate.h"
+#include "ash/common/wm_shell.h"
#include "ash/mus/accessibility_delegate_mus.h"
#include "ash/mus/new_window_delegate_mus.h"
+#include "ash/mus/shelf_delegate_mus.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string16.h"
#include "base/strings/string_util.h"
@@ -99,31 +100,6 @@ class MediaDelegateStub : public MediaDelegate {
DISALLOW_COPY_AND_ASSIGN(MediaDelegateStub);
};
-class ShelfDelegateStub : public ShelfDelegate {
- public:
- ShelfDelegateStub() {}
- ~ShelfDelegateStub() override {}
-
- // ShelfDelegate overrides:
- void OnShelfCreated(Shelf* shelf) override {}
- void OnShelfDestroyed(Shelf* shelf) override {}
- void OnShelfAlignmentChanged(Shelf* shelf) override {}
- void OnShelfAutoHideBehaviorChanged(Shelf* shelf) override {}
- void OnShelfAutoHideStateChanged(Shelf* shelf) override {}
- void OnShelfVisibilityStateChanged(Shelf* shelf) override {}
- ShelfID GetShelfIDForAppID(const std::string& app_id) override { return 0; }
- bool HasShelfIDToAppIDMapping(ShelfID id) const override { return false; }
- const std::string& GetAppIDForShelfID(ShelfID id) override {
- return base::EmptyString();
- }
- void PinAppWithID(const std::string& app_id) override {}
- bool IsAppPinned(const std::string& app_id) override { return false; }
- void UnpinAppWithID(const std::string& app_id) override {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(ShelfDelegateStub);
-};
-
} // namespace
ShellDelegateMus::ShellDelegateMus(
@@ -192,8 +168,7 @@ app_list::AppListPresenter* ShellDelegateMus::GetAppListPresenter() {
}
ShelfDelegate* ShellDelegateMus::CreateShelfDelegate(ShelfModel* model) {
- // TODO(mash): Implement a real shelf delegate; maybe port ShelfDelegateMus?
- return new ShelfDelegateStub;
+ return new ShelfDelegateMus(WmShell::Get()->shelf_model());
}
SystemTrayDelegate* ShellDelegateMus::CreateSystemTrayDelegate() {

Powered by Google App Engine
This is Rietveld 408576698