OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/gpu/gpu_process_host.h" | 5 #include "content/browser/gpu/gpu_process_host.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 private: | 334 private: |
335 // ConnectionFilter: | 335 // ConnectionFilter: |
336 bool OnConnect(const service_manager::Identity& remote_identity, | 336 bool OnConnect(const service_manager::Identity& remote_identity, |
337 service_manager::InterfaceRegistry* registry, | 337 service_manager::InterfaceRegistry* registry, |
338 service_manager::Connector* connector) override { | 338 service_manager::Connector* connector) override { |
339 if (remote_identity.name() != mojom::kGpuServiceName) | 339 if (remote_identity.name() != mojom::kGpuServiceName) |
340 return false; | 340 return false; |
341 | 341 |
342 GetContentClient()->browser()->ExposeInterfacesToGpuProcess(registry, | 342 GetContentClient()->browser()->ExposeInterfacesToGpuProcess(registry, |
343 host_); | 343 host_); |
| 344 |
| 345 #if defined(OS_ANDROID) |
| 346 GpuProcessHostUIShim::RegisterUIThreadMojoInterfaces(registry); |
| 347 #endif |
| 348 |
344 return true; | 349 return true; |
345 } | 350 } |
346 | 351 |
347 GpuProcessHost* host_; | 352 GpuProcessHost* host_; |
348 | 353 |
349 DISALLOW_COPY_AND_ASSIGN(ConnectionFilterImpl); | 354 DISALLOW_COPY_AND_ASSIGN(ConnectionFilterImpl); |
350 }; | 355 }; |
351 | 356 |
352 // static | 357 // static |
353 bool GpuProcessHost::ValidateHost(GpuProcessHost* host) { | 358 bool GpuProcessHost::ValidateHost(GpuProcessHost* host) { |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 GetShaderCacheFactorySingleton()->Get(client_id); | 1216 GetShaderCacheFactorySingleton()->Get(client_id); |
1212 if (!cache.get()) | 1217 if (!cache.get()) |
1213 return; | 1218 return; |
1214 | 1219 |
1215 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); | 1220 cache->set_shader_loaded_callback(base::Bind(&HostLoadedShader, host_id_)); |
1216 | 1221 |
1217 client_id_to_shader_cache_[client_id] = cache; | 1222 client_id_to_shader_cache_[client_id] = cache; |
1218 } | 1223 } |
1219 | 1224 |
1220 } // namespace content | 1225 } // namespace content |
OLD | NEW |