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

Side by Side Diff: mojo/shell/context.cc

Issue 734273002: Cleanse mojo/services/gles2 of InterfaceImpl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Moar interface request Created 6 years, 1 month 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/native_viewport/main.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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 // InterfaceFactory<NativeViewport> implementation. 158 // InterfaceFactory<NativeViewport> implementation.
159 virtual void Create(ApplicationConnection* connection, 159 virtual void Create(ApplicationConnection* connection,
160 InterfaceRequest<NativeViewport> request) override { 160 InterfaceRequest<NativeViewport> request) override {
161 BindToRequest(new NativeViewportImpl(app_.get(), false), &request); 161 BindToRequest(new NativeViewportImpl(app_.get(), false), &request);
162 } 162 }
163 163
164 // InterfaceFactory<Gpu> implementation. 164 // InterfaceFactory<Gpu> implementation.
165 virtual void Create(ApplicationConnection* connection, 165 virtual void Create(ApplicationConnection* connection,
166 InterfaceRequest<Gpu> request) override { 166 InterfaceRequest<Gpu> request) override {
167 BindToRequest(new GpuImpl(share_group_.get(), mailbox_manager_.get()), 167 new GpuImpl(request.Pass(), share_group_.get(), mailbox_manager_.get());
168 &request);
169 } 168 }
170 169
171 scoped_refptr<gfx::GLShareGroup> share_group_; 170 scoped_refptr<gfx::GLShareGroup> share_group_;
172 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; 171 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
173 scoped_ptr<ApplicationImpl> app_; 172 scoped_ptr<ApplicationImpl> app_;
174 DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader); 173 DISALLOW_COPY_AND_ASSIGN(NativeViewportApplicationLoader);
175 }; 174 };
176 #endif 175 #endif
177 176
178 Context::Context() : application_manager_(this) { 177 Context::Context() : application_manager_(this) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 ScopedMessagePipeHandle Context::ConnectToServiceByName( 293 ScopedMessagePipeHandle Context::ConnectToServiceByName(
295 const GURL& application_url, 294 const GURL& application_url,
296 const std::string& service_name) { 295 const std::string& service_name) {
297 app_urls_.insert(application_url); 296 app_urls_.insert(application_url);
298 return application_manager_.ConnectToServiceByName( 297 return application_manager_.ConnectToServiceByName(
299 application_url, service_name).Pass(); 298 application_url, service_name).Pass();
300 } 299 }
301 300
302 } // namespace shell 301 } // namespace shell
303 } // namespace mojo 302 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698