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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 void LoadedShader(const std::string& key, const std::string& data); | 165 void LoadedShader(const std::string& key, const std::string& data); |
166 | 166 |
167 private: | 167 private: |
168 static bool ValidateHost(GpuProcessHost* host); | 168 static bool ValidateHost(GpuProcessHost* host); |
169 | 169 |
170 GpuProcessHost(int host_id, GpuProcessKind kind); | 170 GpuProcessHost(int host_id, GpuProcessKind kind); |
171 ~GpuProcessHost() override; | 171 ~GpuProcessHost() override; |
172 | 172 |
173 bool Init(); | 173 bool Init(); |
174 | 174 |
| 175 void RegisterMojoServices(); |
| 176 |
175 // Post an IPC message to the UI shim's message handler on the UI thread. | 177 // Post an IPC message to the UI shim's message handler on the UI thread. |
176 void RouteOnUIThread(const IPC::Message& message); | 178 void RouteOnUIThread(const IPC::Message& message); |
177 | 179 |
178 // BrowserChildProcessHostDelegate implementation. | 180 // BrowserChildProcessHostDelegate implementation. |
179 bool OnMessageReceived(const IPC::Message& message) override; | 181 bool OnMessageReceived(const IPC::Message& message) override; |
180 void OnChannelConnected(int32_t peer_pid) override; | 182 void OnChannelConnected(int32_t peer_pid) override; |
181 void OnProcessLaunched() override; | 183 void OnProcessLaunched() override; |
182 void OnProcessLaunchFailed() override; | 184 void OnProcessLaunchFailed() override; |
183 void OnProcessCrashed(int exit_code) override; | 185 void OnProcessCrashed(int exit_code) override; |
184 | 186 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 // Browser-side Mojo endpoint which sets up a Mojo channel with the child | 294 // Browser-side Mojo endpoint which sets up a Mojo channel with the child |
293 // process and contains the browser's ServiceRegistry. | 295 // process and contains the browser's ServiceRegistry. |
294 std::unique_ptr<MojoApplicationHost> mojo_application_host_; | 296 std::unique_ptr<MojoApplicationHost> mojo_application_host_; |
295 | 297 |
296 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 298 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
297 }; | 299 }; |
298 | 300 |
299 } // namespace content | 301 } // namespace content |
300 | 302 |
301 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 303 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
OLD | NEW |