| 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 |
| 11 #include "base/process.h" | 11 #include "base/process.h" |
| 12 #include "content/common/content_export.h" | 12 #include "content/common/content_export.h" |
| 13 #include "content/public/common/gpu_feature_type.h" | 13 #include "content/public/common/gpu_feature_type.h" |
| 14 #include "content/public/common/gpu_switching_option.h" | 14 #include "content/public/common/gpu_switching_option.h" |
| 15 | 15 |
| 16 class FilePath; | |
| 17 class GURL; | 16 class GURL; |
| 18 | 17 |
| 19 namespace base { | 18 namespace base { |
| 19 class FilePath; |
| 20 class ListValue; | 20 class ListValue; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace content { | 23 namespace content { |
| 24 | 24 |
| 25 class GpuDataManagerObserver; | 25 class GpuDataManagerObserver; |
| 26 struct GPUInfo; | 26 struct GPUInfo; |
| 27 | 27 |
| 28 // This class is fully thread-safe. | 28 // This class is fully thread-safe. |
| 29 class GpuDataManager { | 29 class GpuDataManager { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 59 virtual bool IsCompleteGpuInfoAvailable() const = 0; | 59 virtual bool IsCompleteGpuInfoAvailable() const = 0; |
| 60 | 60 |
| 61 // Requests that the GPU process report its current video memory usage stats, | 61 // Requests that the GPU process report its current video memory usage stats, |
| 62 // which can be retrieved via the GPU data manager's on-update function. | 62 // which can be retrieved via the GPU data manager's on-update function. |
| 63 virtual void RequestVideoMemoryUsageStatsUpdate() const = 0; | 63 virtual void RequestVideoMemoryUsageStatsUpdate() const = 0; |
| 64 | 64 |
| 65 // Returns true if the software rendering should currently be used. | 65 // Returns true if the software rendering should currently be used. |
| 66 virtual bool ShouldUseSoftwareRendering() const = 0; | 66 virtual bool ShouldUseSoftwareRendering() const = 0; |
| 67 | 67 |
| 68 // Register a path to the SwiftShader software renderer. | 68 // Register a path to the SwiftShader software renderer. |
| 69 virtual void RegisterSwiftShaderPath(const FilePath& path) = 0; | 69 virtual void RegisterSwiftShaderPath(const base::FilePath& path) = 0; |
| 70 | 70 |
| 71 // Registers/unregister |observer|. | 71 // Registers/unregister |observer|. |
| 72 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; | 72 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; |
| 73 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; | 73 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; |
| 74 | 74 |
| 75 // Notifies the gpu process about the number of browser windows, so | 75 // Notifies the gpu process about the number of browser windows, so |
| 76 // they can be used to determine managed memory allocation. | 76 // they can be used to determine managed memory allocation. |
| 77 virtual void SetWindowCount(uint32 count) = 0; | 77 virtual void SetWindowCount(uint32 count) = 0; |
| 78 virtual uint32 GetWindowCount() const = 0; | 78 virtual uint32 GetWindowCount() const = 0; |
| 79 | 79 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 95 std::string* gl_renderer, | 95 std::string* gl_renderer, |
| 96 std::string* gl_version) = 0; | 96 std::string* gl_version) = 0; |
| 97 | 97 |
| 98 protected: | 98 protected: |
| 99 virtual ~GpuDataManager() {} | 99 virtual ~GpuDataManager() {} |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 }; // namespace content | 102 }; // namespace content |
| 103 | 103 |
| 104 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 104 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
| OLD | NEW |