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