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_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 typedef base::Callback<void(const std::list<base::ProcessHandle>&)> | 32 typedef base::Callback<void(const std::list<base::ProcessHandle>&)> |
33 GetGpuProcessHandlesCallback; | 33 GetGpuProcessHandlesCallback; |
34 | 34 |
35 // Getter for the singleton. | 35 // Getter for the singleton. |
36 CONTENT_EXPORT static GpuDataManager* GetInstance(); | 36 CONTENT_EXPORT static GpuDataManager* GetInstance(); |
37 | 37 |
38 virtual void InitializeForTesting(const std::string& gpu_blacklist_json, | 38 virtual void InitializeForTesting(const std::string& gpu_blacklist_json, |
39 const gpu::GPUInfo& gpu_info) = 0; | 39 const gpu::GPUInfo& gpu_info) = 0; |
40 | 40 |
41 virtual bool IsFeatureBlacklisted(int feature) const = 0; | 41 virtual bool IsFeatureBlacklisted(int feature) const = 0; |
| 42 virtual bool IsFeatureEnabled(int feature) const = 0; |
42 | 43 |
43 virtual gpu::GPUInfo GetGPUInfo() const = 0; | 44 virtual gpu::GPUInfo GetGPUInfo() const = 0; |
44 | 45 |
45 // Retrieves a list of process handles for all gpu processes. | 46 // Retrieves a list of process handles for all gpu processes. |
46 virtual void GetGpuProcessHandles( | 47 virtual void GetGpuProcessHandles( |
47 const GetGpuProcessHandlesCallback& callback) const = 0; | 48 const GetGpuProcessHandlesCallback& callback) const = 0; |
48 | 49 |
49 // This indicator might change because we could collect more GPU info or | 50 // This indicator might change because we could collect more GPU info or |
50 // because the GPU blacklist could be updated. | 51 // because the GPU blacklist could be updated. |
51 // If this returns false, any further GPU access, including launching GPU | 52 // If this returns false, any further GPU access, including launching GPU |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // the backlists decision and applying commandline switches. | 111 // the backlists decision and applying commandline switches. |
111 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) = 0; | 112 virtual void SetGpuInfo(const gpu::GPUInfo& gpu_info) = 0; |
112 | 113 |
113 protected: | 114 protected: |
114 virtual ~GpuDataManager() {} | 115 virtual ~GpuDataManager() {} |
115 }; | 116 }; |
116 | 117 |
117 }; // namespace content | 118 }; // namespace content |
118 | 119 |
119 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 120 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
OLD | NEW |