| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 // This class is fully thread-safe. | 24 // This class is fully thread-safe. |
| 25 class GpuDataManager { | 25 class GpuDataManager { |
| 26 public: | 26 public: |
| 27 // Getter for the singleton. | 27 // Getter for the singleton. |
| 28 CONTENT_EXPORT static GpuDataManager* GetInstance(); | 28 CONTENT_EXPORT static GpuDataManager* GetInstance(); |
| 29 | 29 |
| 30 // This collects preliminary GPU info, load GpuBlacklist, and compute the | 30 // This collects preliminary GPU info, load GpuBlacklist, and compute the |
| 31 // preliminary blacklisted features; it should only be called at browser | 31 // preliminary blacklisted features; it should only be called at browser |
| 32 // startup time in UI thread before the IO restriction is turned on. | 32 // startup time in UI thread before the IO restriction is turned on. |
| 33 virtual void Initialize(const std::string& browser_version_string, | 33 virtual void Initialize(const std::string& browser_version_string) = 0; |
| 34 const std::string& gpu_blacklist_json) = 0; | |
| 35 // The same as above, except that the GPUInfo is provided. | 34 // The same as above, except that the GPUInfo is provided. |
| 36 // For testing only. | 35 // For testing only. |
| 37 virtual void Initialize(const std::string& browser_version_string, | 36 virtual void Initialize(const std::string& browser_version_string, |
| 38 const std::string& gpu_blacklist_json, | 37 const std::string& gpu_blacklist_json, |
| 39 const content::GPUInfo& gpu_info) = 0; | 38 const content::GPUInfo& gpu_info) = 0; |
| 40 | 39 |
| 41 virtual std::string GetBlacklistVersion() const = 0; | 40 virtual std::string GetBlacklistVersion() const = 0; |
| 42 | 41 |
| 43 virtual GpuFeatureType GetBlacklistedFeatures() const = 0; | 42 virtual GpuFeatureType GetBlacklistedFeatures() const = 0; |
| 44 | 43 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; | 85 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; |
| 87 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; | 86 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; |
| 88 | 87 |
| 89 protected: | 88 protected: |
| 90 virtual ~GpuDataManager() {} | 89 virtual ~GpuDataManager() {} |
| 91 }; | 90 }; |
| 92 | 91 |
| 93 }; // namespace content | 92 }; // namespace content |
| 94 | 93 |
| 95 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 94 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
| OLD | NEW |