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

Unified Diff: services/ui/demo/mus_demo.h

Issue 2622103004: Mus Demo: Demonstrate external window mode (Closed)
Patch Set: Add MusDemoExternal Created 3 years, 10 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: 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;

Powered by Google App Engine
This is Rietveld 408576698