Chromium Code Reviews| 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() = 0; |
|
jam
2012/09/20 19:31:54
this can be taken out of the public API, since it'
Zhenyao Mo
2012/09/20 21:24:03
Done.
| |
| 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& gpu_blacklist_json, |
|
jam
2012/09/20 19:31:54
nit: while you're changing the callsites, if this
Zhenyao Mo
2012/09/20 21:24:03
Done.
| |
| 38 const std::string& gpu_blacklist_json, | |
| 39 const content::GPUInfo& gpu_info) = 0; | 37 const content::GPUInfo& gpu_info) = 0; |
| 40 | 38 |
| 41 virtual std::string GetBlacklistVersion() const = 0; | 39 virtual std::string GetBlacklistVersion() const = 0; |
| 42 | 40 |
| 43 virtual GpuFeatureType GetBlacklistedFeatures() const = 0; | 41 virtual GpuFeatureType GetBlacklistedFeatures() const = 0; |
| 44 | 42 |
| 45 virtual GpuSwitchingOption GetGpuSwitchingOption() const = 0; | 43 virtual GpuSwitchingOption GetGpuSwitchingOption() const = 0; |
| 46 | 44 |
| 47 // Returns the reasons for the latest run of blacklisting decisions. | 45 // Returns the reasons for the latest run of blacklisting decisions. |
| 48 // For the structure of returned value, see documentation for | 46 // For the structure of returned value, see documentation for |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 86 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; | 84 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; |
| 87 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; | 85 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; |
| 88 | 86 |
| 89 protected: | 87 protected: |
| 90 virtual ~GpuDataManager() {} | 88 virtual ~GpuDataManager() {} |
| 91 }; | 89 }; |
| 92 | 90 |
| 93 }; // namespace content | 91 }; // namespace content |
| 94 | 92 |
| 95 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ | 93 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ |
| OLD | NEW |