| 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 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 // thread. Calls Get and if a host is returned, sends it. Can be called from | 99 // thread. Calls Get and if a host is returned, sends it. Can be called from |
| 100 // any thread. Deletes the message if it cannot be sent. | 100 // any thread. Deletes the message if it cannot be sent. |
| 101 CONTENT_EXPORT static void SendOnIO(GpuProcessKind kind, | 101 CONTENT_EXPORT static void SendOnIO(GpuProcessKind kind, |
| 102 CauseForGpuLaunch cause, | 102 CauseForGpuLaunch cause, |
| 103 IPC::Message* message); | 103 IPC::Message* message); |
| 104 | 104 |
| 105 CONTENT_EXPORT static void RegisterGpuMainThreadFactory( | 105 CONTENT_EXPORT static void RegisterGpuMainThreadFactory( |
| 106 GpuMainThreadFactoryFunction create); | 106 GpuMainThreadFactoryFunction create); |
| 107 | 107 |
| 108 // BrowserChildProcessHostDelegate implementation. | 108 // BrowserChildProcessHostDelegate implementation. |
| 109 ServiceRegistry* GetServiceRegistry() override; | 109 shell::InterfaceRegistry* GetInterfaceRegistry() override; |
| 110 shell::InterfaceProvider* GetRemoteInterfaces() override; |
| 110 | 111 |
| 111 // Get the GPU process host for the GPU process with the given ID. Returns | 112 // Get the GPU process host for the GPU process with the given ID. Returns |
| 112 // null if the process no longer exists. | 113 // null if the process no longer exists. |
| 113 static GpuProcessHost* FromID(int host_id); | 114 static GpuProcessHost* FromID(int host_id); |
| 114 int host_id() const { return host_id_; } | 115 int host_id() const { return host_id_; } |
| 115 | 116 |
| 116 // IPC::Sender implementation. | 117 // IPC::Sender implementation. |
| 117 bool Send(IPC::Message* msg) override; | 118 bool Send(IPC::Message* msg) override; |
| 118 | 119 |
| 119 // Adds a message filter to the GpuProcessHost's channel. | 120 // Adds a message filter to the GpuProcessHost's channel. |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 bool uma_memory_stats_received_; | 284 bool uma_memory_stats_received_; |
| 284 gpu::GPUMemoryUmaStats uma_memory_stats_; | 285 gpu::GPUMemoryUmaStats uma_memory_stats_; |
| 285 | 286 |
| 286 typedef std::map<int32_t, scoped_refptr<ShaderDiskCache>> | 287 typedef std::map<int32_t, scoped_refptr<ShaderDiskCache>> |
| 287 ClientIdToShaderCacheMap; | 288 ClientIdToShaderCacheMap; |
| 288 ClientIdToShaderCacheMap client_id_to_shader_cache_; | 289 ClientIdToShaderCacheMap client_id_to_shader_cache_; |
| 289 | 290 |
| 290 std::string shader_prefix_key_; | 291 std::string shader_prefix_key_; |
| 291 | 292 |
| 292 // Browser-side Mojo endpoint which sets up a Mojo channel with the child | 293 // Browser-side Mojo endpoint which sets up a Mojo channel with the child |
| 293 // process and contains the browser's ServiceRegistry. | 294 // process and contains the browser's InterfaceRegistry. |
| 294 const std::string child_token_; | 295 const std::string child_token_; |
| 295 std::unique_ptr<MojoApplicationHost> mojo_application_host_; | 296 std::unique_ptr<MojoApplicationHost> mojo_application_host_; |
| 296 | 297 |
| 297 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 298 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
| 298 }; | 299 }; |
| 299 | 300 |
| 300 } // namespace content | 301 } // namespace content |
| 301 | 302 |
| 302 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 303 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| OLD | NEW |