| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <queue> | 10 #include <queue> |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 class GpuProcessHost : public content::BrowserChildProcessHostDelegate, | 32 class GpuProcessHost : public content::BrowserChildProcessHostDelegate, |
| 33 public IPC::Message::Sender, | 33 public IPC::Message::Sender, |
| 34 public base::NonThreadSafe { | 34 public base::NonThreadSafe { |
| 35 public: | 35 public: |
| 36 enum GpuProcessKind { | 36 enum GpuProcessKind { |
| 37 GPU_PROCESS_KIND_UNSANDBOXED, | 37 GPU_PROCESS_KIND_UNSANDBOXED, |
| 38 GPU_PROCESS_KIND_SANDBOXED | 38 GPU_PROCESS_KIND_SANDBOXED |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 typedef base::Callback<void(const IPC::ChannelHandle&, | 41 typedef base::Callback<void(const IPC::ChannelHandle&, |
| 42 base::ProcessHandle, | |
| 43 const content::GPUInfo&)> | 42 const content::GPUInfo&)> |
| 44 EstablishChannelCallback; | 43 EstablishChannelCallback; |
| 45 | 44 |
| 46 typedef base::Callback<void(int32)> CreateCommandBufferCallback; | 45 typedef base::Callback<void(int32)> CreateCommandBufferCallback; |
| 47 | 46 |
| 48 static bool gpu_enabled() { return gpu_enabled_; } | 47 static bool gpu_enabled() { return gpu_enabled_; } |
| 49 | 48 |
| 50 // Creates a new GpuProcessHost or gets an existing one, resulting in the | 49 // Creates a new GpuProcessHost or gets an existing one, resulting in the |
| 51 // launching of a GPU process if required. Returns null on failure. It | 50 // launching of a GPU process if required. Returns null on failure. It |
| 52 // is not safe to store the pointer once control has returned to the message | 51 // is not safe to store the pointer once control has returned to the message |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 static bool gpu_enabled_; | 183 static bool gpu_enabled_; |
| 185 | 184 |
| 186 static bool hardware_gpu_enabled_; | 185 static bool hardware_gpu_enabled_; |
| 187 | 186 |
| 188 scoped_ptr<BrowserChildProcessHostImpl> process_; | 187 scoped_ptr<BrowserChildProcessHostImpl> process_; |
| 189 | 188 |
| 190 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 189 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
| 191 }; | 190 }; |
| 192 | 191 |
| 193 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 192 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
| OLD | NEW |