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

Unified Diff: ash/mus/window_manager.cc

Issue 2150023002: Add ShellDelegate, MediaDelegate and KeyboardUI stubs to mus ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 5 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/shell_delegate_mus.cc ('k') | ash/pointer_watcher_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager.cc
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index 33d88062c94ab57c114da24d85593265ac1123ca..f0d3da31850ca69fa1c5f914ef3d84a2d97cf774 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -17,6 +17,7 @@
#include "ash/mus/property_util.h"
#include "ash/mus/root_window_controller.h"
#include "ash/mus/shadow_controller.h"
+#include "ash/mus/shell_delegate_mus.h"
#include "ash/mus/window_manager_observer.h"
#include "ash/public/interfaces/container.mojom.h"
#include "services/ui/common/event_matcher_util.h"
@@ -27,6 +28,7 @@
#include "services/ui/public/cpp/window_tree_client.h"
#include "services/ui/public/interfaces/mus_constants.mojom.h"
#include "services/ui/public/interfaces/window_manager.mojom.h"
+#include "ui/app_list/presenter/app_list_presenter.h"
#include "ui/base/hit_test.h"
#include "ui/events/mojo/event.mojom.h"
#include "ui/views/mus/screen_mus.h"
@@ -40,6 +42,29 @@ void AssertTrue(bool success) {
DCHECK(success);
}
+// TODO(jamescook): Port ash::sysui::AppListPresenterMus and eliminate this.
+class AppListPresenterStub : public app_list::AppListPresenter {
+ public:
+ AppListPresenterStub() {}
+ ~AppListPresenterStub() override {}
+
+ // app_list::AppListPresenter:
+ void Show(int64_t display_id) override { NOTIMPLEMENTED(); }
+ void Dismiss() override { NOTIMPLEMENTED(); }
+ void ToggleAppList(int64_t display_id) override { NOTIMPLEMENTED(); }
+ bool IsVisible() const override {
+ NOTIMPLEMENTED();
+ return false;
+ }
+ bool GetTargetVisibility() const override {
+ NOTIMPLEMENTED();
+ return false;
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AppListPresenterStub);
+};
+
WindowManager::WindowManager(shell::Connector* connector)
: connector_(connector) {}
@@ -70,8 +95,10 @@ void WindowManager::Init(::ui::WindowTreeClient* window_tree_client) {
window_manager_client_->SetFrameDecorationValues(
std::move(frame_decoration_values));
- // TODO(msw): Provide a valid ShellDelegate here; maybe port ShellDelegateMus?
- shell_.reset(new WmShellMus(nullptr, window_tree_client_, connector_));
+ std::unique_ptr<ShellDelegate> shell_delegate(
+ new ShellDelegateMus(base::MakeUnique<AppListPresenterStub>()));
+ shell_.reset(new WmShellMus(std::move(shell_delegate), window_tree_client_,
+ connector_));
lookup_.reset(new WmLookupMus);
}
« no previous file with comments | « ash/mus/shell_delegate_mus.cc ('k') | ash/pointer_watcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698