Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Side by Side Diff: content/public/browser/gpu_data_manager.h

Issue 10911315: Move gpu blacklist data file to content side. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/content_resources.grd ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "content/public/common/gpu_feature_type.h" 11 #include "content/public/common/gpu_feature_type.h"
12 12
13 class FilePath; 13 class FilePath;
14 14
15 namespace base { 15 namespace base {
16 class ListValue; 16 class ListValue;
17 } 17 }
18 18
19 namespace content { 19 namespace content {
20 20
21 class GpuDataManagerObserver; 21 class GpuDataManagerObserver;
22 struct GPUInfo; 22 struct GPUInfo;
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 virtual void InitializeForTesting(const std::string& gpu_blacklist_json,
31 // preliminary blacklisted features; it should only be called at browser 31 const content::GPUInfo& gpu_info) = 0;
32 // startup time in UI thread before the IO restriction is turned on.
33 virtual void Initialize(const std::string& browser_version_string,
34 const std::string& gpu_blacklist_json) = 0;
35 // The same as above, except that the GPUInfo is provided.
36 // For testing only.
37 virtual void Initialize(const std::string& browser_version_string,
38 const std::string& gpu_blacklist_json,
39 const content::GPUInfo& gpu_info) = 0;
40 32
41 virtual std::string GetBlacklistVersion() const = 0; 33 virtual std::string GetBlacklistVersion() const = 0;
42 34
43 virtual GpuFeatureType GetBlacklistedFeatures() const = 0; 35 virtual GpuFeatureType GetBlacklistedFeatures() const = 0;
44 36
45 virtual GpuSwitchingOption GetGpuSwitchingOption() const = 0; 37 virtual GpuSwitchingOption GetGpuSwitchingOption() const = 0;
46 38
47 // Returns the reasons for the latest run of blacklisting decisions. 39 // Returns the reasons for the latest run of blacklisting decisions.
48 // For the structure of returned value, see documentation for 40 // For the structure of returned value, see documentation for
49 // GpuBlacklist::GetBlacklistedReasons(). 41 // GpuBlacklist::GetBlacklistedReasons().
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 virtual void AddObserver(GpuDataManagerObserver* observer) = 0; 78 virtual void AddObserver(GpuDataManagerObserver* observer) = 0;
87 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0; 79 virtual void RemoveObserver(GpuDataManagerObserver* observer) = 0;
88 80
89 protected: 81 protected:
90 virtual ~GpuDataManager() {} 82 virtual ~GpuDataManager() {}
91 }; 83 };
92 84
93 }; // namespace content 85 }; // namespace content
94 86
95 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_ 87 #endif // CONTENT_PUBLIC_BROWSER_GPU_DATA_MANAGER_H_
OLDNEW
« no previous file with comments | « content/content_resources.grd ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698