| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |