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

Unified Diff: components/mus/example/wm/window_manager_application.h

Issue 1423133003: Routes calls to WM through WS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: no braces Created 5 years, 2 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/example/wm/BUILD.gn ('k') | components/mus/example/wm/window_manager_application.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/example/wm/window_manager_application.h
diff --git a/components/mus/example/wm/window_manager_application.h b/components/mus/example/wm/window_manager_application.h
index b55ef606b16c5864a309cbd495fee5a2192f4d06..3b3c5bb67f6dce2ef5a1d28baca6b9948f6f2157 100644
--- a/components/mus/example/wm/window_manager_application.h
+++ b/components/mus/example/wm/window_manager_application.h
@@ -14,10 +14,13 @@
#include "components/mus/public/interfaces/window_tree_host.mojom.h"
#include "mojo/application/public/cpp/application_delegate.h"
#include "mojo/application/public/cpp/interface_factory_impl.h"
+#include "mojo/common/weak_binding_set.h"
enum class Container;
class WindowLayout;
+class WindowManagerImpl;
+
class WindowManagerApplication
: public mojo::ApplicationDelegate,
public mus::WindowTreeDelegate,
@@ -57,6 +60,11 @@ class WindowManagerApplication
int window_count_;
mus::mojom::WindowTreeHostPtr host_;
+
+ // |window_manager_| is created once OnEmbed() is called. Until that time
+ // |requests_| stores any pending WindowManager interface requests.
+ scoped_ptr<WindowManagerImpl> window_manager_;
+ mojo::WeakBindingSet<mus::mojom::WindowManager> window_manager_binding_;
ScopedVector<mojo::InterfaceRequest<mus::mojom::WindowManager>> requests_;
scoped_ptr<WindowLayout> layout_;
« no previous file with comments | « components/mus/example/wm/BUILD.gn ('k') | components/mus/example/wm/window_manager_application.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698