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

Unified Diff: components/mus/demo/mus_demo.h

Issue 2005143002: Fix mus_demo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 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
« no previous file with comments | « components/mus/demo/manifest.json ('k') | components/mus/demo/mus_demo.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/demo/mus_demo.h
diff --git a/components/mus/demo/mus_demo.h b/components/mus/demo/mus_demo.h
index ab5b513f84d59aa46556b259fbeb2c46b2e6907a..c063c039b6b5fd291dfbede9bf4ce20e795d1320 100644
--- a/components/mus/demo/mus_demo.h
+++ b/components/mus/demo/mus_demo.h
@@ -16,7 +16,7 @@
#include "components/mus/public/cpp/window.h"
#include "components/mus/public/cpp/window_manager_delegate.h"
#include "components/mus/public/cpp/window_tree_delegate.h"
-#include "components/mus/public/interfaces/window_tree_host.mojom.h"
+#include "components/mus/public/interfaces/window_manager_factory.mojom.h"
#include "mojo/public/cpp/bindings/binding_set.h"
#include "services/shell/public/cpp/connector.h"
#include "services/shell/public/cpp/shell_client.h"
@@ -32,6 +32,7 @@ namespace mus_demo {
// window and draws a spinning square in the center of the window. Provides a
// simple way to demonstrate that the graphic stack works as intended.
class MusDemo : public shell::ShellClient,
+ public mus::mojom::WindowManagerFactory,
public mus::WindowTreeDelegate,
public mus::WindowManagerDelegate {
public:
@@ -51,6 +52,11 @@ class MusDemo : public shell::ShellClient,
void OnConnectionLost(mus::WindowTreeConnection* connection) override;
void OnEventObserved(const ui::Event& event, mus::Window* target) override;
+ // mus::mojom::WindowManagerFactory:
+ void CreateWindowManager(
+ mus::mojom::DisplayPtr display,
+ mus::mojom::WindowTreeClientRequest request) override;
+
// WindowManagerDelegate:
void SetWindowManagerClient(mus::WindowManagerClient* client) override;
bool OnWmSetBounds(mus::Window* window, gfx::Rect* bounds) override;
@@ -71,7 +77,10 @@ class MusDemo : public shell::ShellClient,
shell::Connector* connector_ = nullptr;
mus::Window* window_ = nullptr;
- mus::mojom::WindowTreeHostPtr window_tree_host_;
+ std::unique_ptr<mus::WindowTreeConnection> window_tree_connection_;
+ mus::WindowManagerClient* window_manager_client_ = nullptr;
+ mojo::Binding<mus::mojom::WindowManagerFactory>
+ window_manager_factory_binding_;
// Used to send frames to mus.
std::unique_ptr<bitmap_uploader::BitmapUploader> uploader_;
« no previous file with comments | « components/mus/demo/manifest.json ('k') | components/mus/demo/mus_demo.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698