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

Unified Diff: services/ui/ws/window_tree_host_factory.h

Issue 2712203002: c++ / mojo changes for 'external window mode'
Patch Set: addressed sky/fwang feedback (take 5), simpler mus_demo changes / passing unittests Created 3 years, 9 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/ws/window_tree_host_factory.h
diff --git a/services/ui/ws/window_tree_host_factory.h b/services/ui/ws/window_tree_host_factory.h
index 0fa3d514e6935dc884864eaa9f070cb5d7a71e2c..330f18f021834c66aec84fdcd681c16bcaabef00 100644
--- a/services/ui/ws/window_tree_host_factory.h
+++ b/services/ui/ws/window_tree_host_factory.h
@@ -8,6 +8,7 @@
#include <stdint.h>
#include "mojo/public/cpp/bindings/binding_set.h"
+#include "services/ui/common/types.h"
#include "services/ui/public/interfaces/window_tree_host.mojom.h"
#include "services/ui/ws/platform_display_init_params.h"
#include "services/ui/ws/user_id.h"
@@ -16,6 +17,7 @@ namespace ui {
namespace ws {
class WindowServer;
+class WindowTree;
class WindowTreeHostFactory : public mojom::WindowTreeHostFactory {
public:
@@ -24,16 +26,24 @@ class WindowTreeHostFactory : public mojom::WindowTreeHostFactory {
void AddBinding(mojom::WindowTreeHostFactoryRequest request);
+ WindowTree* window_tree() { return tree_; }
+ void set_window_tree(WindowTree* tree) { tree_ = tree; }
+
private:
// mojom::WindowTreeHostFactory implementation.
void CreateWindowTreeHost(mojom::WindowTreeHostRequest host,
mojom::WindowTreeClientPtr tree_client) override;
+ void CreatePlatformWindow(mojom::WindowTreeHostRequest tree_host_request,
+ Id client_id) override;
WindowServer* window_server_;
const UserId user_id_;
PlatformDisplayInitParams platform_display_init_params_;
mojo::BindingSet<mojom::WindowTreeHostFactory> bindings_;
+ // Owned by WindowServer.
+ WindowTree* tree_ = nullptr;
+
DISALLOW_COPY_AND_ASSIGN(WindowTreeHostFactory);
};

Powered by Google App Engine
This is Rietveld 408576698