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