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

Unified Diff: mojo/shell/context.cc

Issue 510553002: Teach the native viewport service to draw a Surface into itself (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: mojo/shell/context.cc
diff --git a/mojo/shell/context.cc b/mojo/shell/context.cc
index 706c511489a72a1f4564f3c3f22e7cc3536ee1c5..d30468f06132556774c71dc7d4aaba3bce9c882c 100644
--- a/mojo/shell/context.cc
+++ b/mojo/shell/context.cc
@@ -141,7 +141,14 @@ class Context::NativeViewportApplicationLoader
// InterfaceFactory<NativeViewport> implementation.
virtual void Create(ApplicationConnection* connection,
InterfaceRequest<NativeViewport> request) OVERRIDE {
- BindToRequest(new NativeViewportImpl, &request);
+ SurfacesServicePtr surfaces_service;
+ app_->ConnectToService("mojo:mojo_surfaces_service", &surfaces_service);
+ GpuPtr gpu_service;
+ // TODO(jamesr): Should be mojo_gpu_service
+ app_->ConnectToService("mojo:mojo_native_viewport_service", &gpu_service);
+ BindToRequest(
+ new NativeViewportImpl(surfaces_service.Pass(), gpu_service.Pass()),
+ &request);
}
// InterfaceFactory<Gpu> implementation.

Powered by Google App Engine
This is Rietveld 408576698