Index: services/ui/demo/mus_demo.h |
diff --git a/services/ui/demo/mus_demo.h b/services/ui/demo/mus_demo.h |
index b8d5cb504c7d37291a320f879bcc7769a516f29f..f07030afd5aab738c3a3beed6106943059eaa0f5 100644 |
--- a/services/ui/demo/mus_demo.h |
+++ b/services/ui/demo/mus_demo.h |
@@ -15,6 +15,7 @@ |
#include "base/macros.h" |
#include "base/timer/timer.h" |
#include "services/service_manager/public/cpp/service.h" |
+#include "services/ui/public/interfaces/window_tree_host.mojom.h" |
#include "ui/aura/mus/window_manager_delegate.h" |
#include "ui/aura/mus/window_tree_client_delegate.h" |
#include "ui/display/screen_base.h" |
@@ -57,12 +58,15 @@ class MusDemo : public service_manager::Service, |
explicit WindowTreeData( |
std::unique_ptr<aura::WindowTreeHostMus> window_tree_host, |
int square_size); |
+ explicit WindowTreeData(mojom::WindowTreeHostFactory* factory, |
+ mojom::WindowTreeClientPtr tree_client, |
+ int square_size); |
~WindowTreeData(); |
- private: |
// Initializes the window tree host and start drawing frames. |
void Init(std::unique_ptr<aura::WindowTreeHostMus> window_tree_host); |
+ private: |
// Draws one frame, incrementing the rotation angle. |
void DrawFrame(); |
@@ -72,6 +76,10 @@ class MusDemo : public service_manager::Service, |
// The Window tree host corresponding to this data. |
std::unique_ptr<aura::WindowTreeHostMus> window_tree_host_; |
+ // When the WindowTreeData is created with WindowTreeHostFactory, this holds |
+ // the Mojo pointer to the window tree host. |
+ mojom::WindowTreeHostPtr host_; |
+ |
// Destroys itself when the window gets destroyed. |
aura_extra::ImageWindowDelegate* window_delegate_ = nullptr; |