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 // Sets up mojo support in GPU process. Returns false upon failure. |
| 176 bool SetupMojo(); |
| 177 |
175 // Post an IPC message to the UI shim's message handler on the UI thread. | 178 // Post an IPC message to the UI shim's message handler on the UI thread. |
176 void RouteOnUIThread(const IPC::Message& message); | 179 void RouteOnUIThread(const IPC::Message& message); |
177 | 180 |
178 // BrowserChildProcessHostDelegate implementation. | 181 // BrowserChildProcessHostDelegate implementation. |
179 bool OnMessageReceived(const IPC::Message& message) override; | 182 bool OnMessageReceived(const IPC::Message& message) override; |
180 void OnChannelConnected(int32_t peer_pid) override; | 183 void OnChannelConnected(int32_t peer_pid) override; |
181 void OnProcessLaunched() override; | 184 void OnProcessLaunched() override; |
182 void OnProcessLaunchFailed() override; | 185 void OnProcessLaunchFailed() override; |
183 void OnProcessCrashed(int exit_code) override; | 186 void OnProcessCrashed(int exit_code) override; |
184 | 187 |
(...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 | 295 // Browser-side Mojo endpoint which sets up a Mojo channel with the child |
293 // process and contains the browser's ServiceRegistry. | 296 // process and contains the browser's ServiceRegistry. |
294 std::unique_ptr<MojoApplicationHost> mojo_application_host_; | 297 std::unique_ptr<MojoApplicationHost> mojo_application_host_; |
295 | 298 |
296 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 299 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
297 }; | 300 }; |
298 | 301 |
299 } // namespace content | 302 } // namespace content |
300 | 303 |
301 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 304 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
OLD | NEW |