| 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 shell::InterfaceRegistry* GetInterfaceRegistry() override; | |
| 110 shell::InterfaceProvider* GetRemoteInterfaces() override; | 109 shell::InterfaceProvider* GetRemoteInterfaces() override; |
| 111 | 110 |
| 112 // Get the GPU process host for the GPU process with the given ID. Returns | 111 // Get the GPU process host for the GPU process with the given ID. Returns |
| 113 // null if the process no longer exists. | 112 // null if the process no longer exists. |
| 114 static GpuProcessHost* FromID(int host_id); | 113 static GpuProcessHost* FromID(int host_id); |
| 115 int host_id() const { return host_id_; } | 114 int host_id() const { return host_id_; } |
| 116 | 115 |
| 117 // IPC::Sender implementation. | 116 // IPC::Sender implementation. |
| 118 bool Send(IPC::Message* msg) override; | 117 bool Send(IPC::Message* msg) override; |
| 119 | 118 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 // process and contains the browser's InterfaceRegistry. | 293 // process and contains the browser's InterfaceRegistry. |
| 295 const std::string child_token_; | 294 const std::string child_token_; |
| 296 std::unique_ptr<MojoChildConnection> mojo_child_connection_; | 295 std::unique_ptr<MojoChildConnection> mojo_child_connection_; |
| 297 | 296 |
| 298 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 297 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
| 299 }; | 298 }; |
| 300 | 299 |
| 301 } // namespace content | 300 } // namespace content |
| 302 | 301 |
| 303 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 302 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| OLD | NEW |