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

Side by Side 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, 3 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 unified diff | Download patch
« no previous file with comments | « mojo/services/view_manager/window_tree_host_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/shell/context.h" 5 #include "mojo/shell/context.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 virtual bool ConfigureIncomingConnection( 134 virtual bool ConfigureIncomingConnection(
135 mojo::ApplicationConnection* connection) OVERRIDE { 135 mojo::ApplicationConnection* connection) OVERRIDE {
136 connection->AddService<NativeViewport>(this); 136 connection->AddService<NativeViewport>(this);
137 connection->AddService<Gpu>(this); 137 connection->AddService<Gpu>(this);
138 return true; 138 return true;
139 } 139 }
140 140
141 // InterfaceFactory<NativeViewport> implementation. 141 // InterfaceFactory<NativeViewport> implementation.
142 virtual void Create(ApplicationConnection* connection, 142 virtual void Create(ApplicationConnection* connection,
143 InterfaceRequest<NativeViewport> request) OVERRIDE { 143 InterfaceRequest<NativeViewport> request) OVERRIDE {
144 BindToRequest(new NativeViewportImpl, &request); 144 BindToRequest(new NativeViewportImpl(app_.get()), &request);
145 } 145 }
146 146
147 // InterfaceFactory<Gpu> implementation. 147 // InterfaceFactory<Gpu> implementation.
148 virtual void Create(ApplicationConnection* connection, 148 virtual void Create(ApplicationConnection* connection,
149 InterfaceRequest<Gpu> request) OVERRIDE { 149 InterfaceRequest<Gpu> request) OVERRIDE {
150 BindToRequest(new GpuImpl(share_group_.get(), mailbox_manager_.get()), 150 BindToRequest(new GpuImpl(share_group_.get(), mailbox_manager_.get()),
151 &request); 151 &request);
152 } 152 }
153 153
154 scoped_refptr<gfx::GLShareGroup> share_group_; 154 scoped_refptr<gfx::GLShareGroup> share_group_;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ScopedMessagePipeHandle Context::ConnectToServiceByName( 262 ScopedMessagePipeHandle Context::ConnectToServiceByName(
263 const GURL& application_url, 263 const GURL& application_url,
264 const std::string& service_name) { 264 const std::string& service_name) {
265 app_urls_.insert(application_url); 265 app_urls_.insert(application_url);
266 return application_manager_.ConnectToServiceByName( 266 return application_manager_.ConnectToServiceByName(
267 application_url, service_name).Pass(); 267 application_url, service_name).Pass();
268 } 268 }
269 269
270 } // namespace shell 270 } // namespace shell
271 } // namespace mojo 271 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/view_manager/window_tree_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698