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 24 matching lines...) Expand all Loading... |
35 namespace base { | 35 namespace base { |
36 class Thread; | 36 class Thread; |
37 } | 37 } |
38 | 38 |
39 namespace IPC { | 39 namespace IPC { |
40 struct ChannelHandle; | 40 struct ChannelHandle; |
41 } | 41 } |
42 | 42 |
43 namespace gpu { | 43 namespace gpu { |
44 struct GpuPreferences; | 44 struct GpuPreferences; |
| 45 class ShaderDiskCache; |
45 struct SyncToken; | 46 struct SyncToken; |
46 } | 47 } |
47 | 48 |
48 namespace service_manager { | 49 namespace service_manager { |
49 class InterfaceProvider; | 50 class InterfaceProvider; |
50 } | 51 } |
51 | 52 |
52 namespace content { | 53 namespace content { |
53 class BrowserChildProcessHostImpl; | 54 class BrowserChildProcessHostImpl; |
54 class InProcessChildThreadParams; | 55 class InProcessChildThreadParams; |
55 class ShaderDiskCache; | |
56 | 56 |
57 typedef base::Thread* (*GpuMainThreadFactoryFunction)( | 57 typedef base::Thread* (*GpuMainThreadFactoryFunction)( |
58 const InProcessChildThreadParams&, const gpu::GpuPreferences&); | 58 const InProcessChildThreadParams&, const gpu::GpuPreferences&); |
59 | 59 |
60 class GpuProcessHost : public BrowserChildProcessHostDelegate, | 60 class GpuProcessHost : public BrowserChildProcessHostDelegate, |
61 public IPC::Sender, | 61 public IPC::Sender, |
62 public base::NonThreadSafe { | 62 public base::NonThreadSafe { |
63 public: | 63 public: |
64 enum GpuProcessKind { | 64 enum GpuProcessKind { |
65 GPU_PROCESS_KIND_UNSANDBOXED, | 65 GPU_PROCESS_KIND_UNSANDBOXED, |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 std::unique_ptr<BrowserChildProcessHostImpl> process_; | 276 std::unique_ptr<BrowserChildProcessHostImpl> process_; |
277 | 277 |
278 // Track the URLs of the pages which have live offscreen contexts, | 278 // Track the URLs of the pages which have live offscreen contexts, |
279 // assumed to be associated with untrusted content such as WebGL. | 279 // assumed to be associated with untrusted content such as WebGL. |
280 // For best robustness, when any context lost notification is | 280 // For best robustness, when any context lost notification is |
281 // received, assume all of these URLs are guilty, and block | 281 // received, assume all of these URLs are guilty, and block |
282 // automatic execution of 3D content from those domains. | 282 // automatic execution of 3D content from those domains. |
283 std::multiset<GURL> urls_with_live_offscreen_contexts_; | 283 std::multiset<GURL> urls_with_live_offscreen_contexts_; |
284 | 284 |
285 typedef std::map<int32_t, scoped_refptr<ShaderDiskCache>> | 285 typedef std::map<int32_t, scoped_refptr<gpu::ShaderDiskCache>> |
286 ClientIdToShaderCacheMap; | 286 ClientIdToShaderCacheMap; |
287 ClientIdToShaderCacheMap client_id_to_shader_cache_; | 287 ClientIdToShaderCacheMap client_id_to_shader_cache_; |
288 | 288 |
289 std::string shader_prefix_key_; | 289 std::string shader_prefix_key_; |
290 | 290 |
291 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 291 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
292 }; | 292 }; |
293 | 293 |
294 } // namespace content | 294 } // namespace content |
295 | 295 |
296 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ | 296 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_H_ |
OLD | NEW |