OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 #include <vector> | |
13 | 12 |
14 #include "base/callback.h" | |
15 #include "base/compiler_specific.h" | |
16 #include "base/files/file_path.h" | |
17 #include "base/gtest_prod_util.h" | |
18 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
19 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
20 #include "base/observer_list_threadsafe.h" | 15 #include "base/observer_list_threadsafe.h" |
21 #include "base/process_util.h" | |
22 #include "base/synchronization/lock.h" | |
23 #include "base/time.h" | |
24 #include "base/values.h" | |
25 #include "content/browser/gpu/gpu_blacklist.h" | 16 #include "content/browser/gpu/gpu_blacklist.h" |
| 17 #include "content/browser/gpu/gpu_data_manager_impl.h" |
26 #include "content/browser/gpu/gpu_driver_bug_list.h" | 18 #include "content/browser/gpu/gpu_driver_bug_list.h" |
27 #include "content/browser/gpu/gpu_switching_list.h" | 19 #include "content/browser/gpu/gpu_switching_list.h" |
28 #include "content/public/browser/gpu_data_manager.h" | |
29 #include "content/public/common/gpu_info.h" | |
30 #include "content/public/common/gpu_memory_stats.h" | |
31 #include "content/public/common/gpu_switching_option.h" | |
32 #include "content/public/common/three_d_api_types.h" | |
33 | |
34 class CommandLine; | |
35 class GURL; | |
36 struct WebPreferences; | |
37 | 20 |
38 namespace content { | 21 namespace content { |
39 | 22 |
40 class CONTENT_EXPORT GpuDataManagerImpl | 23 class CONTENT_EXPORT GpuDataManagerImplPrivate { |
41 : public NON_EXPORTED_BASE(GpuDataManager) { | |
42 public: | 24 public: |
43 // Indicates the guilt level of a domain which caused a GPU reset. | 25 static GpuDataManagerImplPrivate* Create(GpuDataManagerImpl* owner); |
44 // If a domain is 100% known to be guilty of resetting the GPU, then | |
45 // it will generally not cause other domains' use of 3D APIs to be | |
46 // blocked, unless system stability would be compromised. | |
47 enum DomainGuilt { | |
48 DOMAIN_GUILT_KNOWN, | |
49 DOMAIN_GUILT_UNKNOWN | |
50 }; | |
51 | 26 |
52 // Indicates the reason that access to a given client API (like | 27 void InitializeForTesting( |
53 // WebGL or Pepper 3D) was blocked or not. This state is distinct | 28 const std::string& gpu_blacklist_json, |
54 // from blacklisting of an entire feature. | 29 const GPUInfo& gpu_info); |
55 enum DomainBlockStatus { | 30 bool IsFeatureBlacklisted(int feature) const; |
56 DOMAIN_BLOCK_STATUS_BLOCKED, | 31 GPUInfo GetGPUInfo() const; |
57 DOMAIN_BLOCK_STATUS_ALL_DOMAINS_BLOCKED, | 32 void GetGpuProcessHandles( |
58 DOMAIN_BLOCK_STATUS_NOT_BLOCKED | 33 const GpuDataManager::GetGpuProcessHandlesCallback& callback) const; |
59 }; | 34 bool GpuAccessAllowed(std::string* reason) const; |
| 35 void RequestCompleteGpuInfoIfNeeded(); |
| 36 bool IsCompleteGpuInfoAvailable() const; |
| 37 void RequestVideoMemoryUsageStatsUpdate() const; |
| 38 bool ShouldUseSwiftShader() const; |
| 39 void RegisterSwiftShaderPath(const base::FilePath& path); |
| 40 void AddObserver(GpuDataManagerObserver* observer); |
| 41 void RemoveObserver(GpuDataManagerObserver* observer); |
| 42 void UnblockDomainFrom3DAPIs(const GURL& url); |
| 43 void DisableGpuWatchdog(); |
| 44 void SetGLStrings(const std::string& gl_vendor, |
| 45 const std::string& gl_renderer, |
| 46 const std::string& gl_version); |
| 47 void GetGLStrings(std::string* gl_vendor, |
| 48 std::string* gl_renderer, |
| 49 std::string* gl_version); |
| 50 void DisableHardwareAcceleration(); |
60 | 51 |
61 // Getter for the singleton. This will return NULL on failure. | |
62 static GpuDataManagerImpl* GetInstance(); | |
63 | |
64 // GpuDataManager implementation. | |
65 virtual void InitializeForTesting( | |
66 const std::string& gpu_blacklist_json, | |
67 const GPUInfo& gpu_info) OVERRIDE; | |
68 virtual bool IsFeatureBlacklisted(int feature) const OVERRIDE; | |
69 virtual GPUInfo GetGPUInfo() const OVERRIDE; | |
70 virtual void GetGpuProcessHandles( | |
71 const GetGpuProcessHandlesCallback& callback) const OVERRIDE; | |
72 virtual bool GpuAccessAllowed(std::string* reason) const OVERRIDE; | |
73 virtual void RequestCompleteGpuInfoIfNeeded() OVERRIDE; | |
74 virtual bool IsCompleteGpuInfoAvailable() const OVERRIDE; | |
75 virtual void RequestVideoMemoryUsageStatsUpdate() const OVERRIDE; | |
76 virtual bool ShouldUseSwiftShader() const OVERRIDE; | |
77 virtual void RegisterSwiftShaderPath(const base::FilePath& path) OVERRIDE; | |
78 virtual void AddObserver(GpuDataManagerObserver* observer) OVERRIDE; | |
79 virtual void RemoveObserver(GpuDataManagerObserver* observer) OVERRIDE; | |
80 virtual void UnblockDomainFrom3DAPIs(const GURL& url) OVERRIDE; | |
81 virtual void DisableGpuWatchdog() OVERRIDE; | |
82 virtual void SetGLStrings(const std::string& gl_vendor, | |
83 const std::string& gl_renderer, | |
84 const std::string& gl_version) OVERRIDE; | |
85 virtual void GetGLStrings(std::string* gl_vendor, | |
86 std::string* gl_renderer, | |
87 std::string* gl_version) OVERRIDE; | |
88 virtual void DisableHardwareAcceleration() OVERRIDE; | |
89 | |
90 // This collects preliminary GPU info, load GpuBlacklist, and compute the | |
91 // preliminary blacklisted features; it should only be called at browser | |
92 // startup time in UI thread before the IO restriction is turned on. | |
93 void Initialize(); | 52 void Initialize(); |
94 | 53 |
95 // Only update if the current GPUInfo is not finalized. If blacklist is | |
96 // loaded, run through blacklist and update blacklisted features. | |
97 void UpdateGpuInfo(const GPUInfo& gpu_info); | 54 void UpdateGpuInfo(const GPUInfo& gpu_info); |
98 | 55 |
99 void UpdateVideoMemoryUsageStats( | 56 void UpdateVideoMemoryUsageStats( |
100 const GPUVideoMemoryUsageStats& video_memory_usage_stats); | 57 const GPUVideoMemoryUsageStats& video_memory_usage_stats); |
101 | 58 |
102 // Insert disable-feature switches corresponding to preliminary gpu feature | |
103 // flags into the renderer process command line. | |
104 void AppendRendererCommandLine(CommandLine* command_line) const; | 59 void AppendRendererCommandLine(CommandLine* command_line) const; |
105 | 60 |
106 // Insert switches into gpu process command line: kUseGL, | |
107 // kDisableGLMultisampling. | |
108 void AppendGpuCommandLine(CommandLine* command_line) const; | 61 void AppendGpuCommandLine(CommandLine* command_line) const; |
109 | 62 |
110 // Insert switches into plugin process command line: | |
111 // kDisableCoreAnimationPlugins. | |
112 void AppendPluginCommandLine(CommandLine* command_line) const; | 63 void AppendPluginCommandLine(CommandLine* command_line) const; |
113 | 64 |
114 // Update WebPreferences for renderer based on blacklisting decisions. | |
115 void UpdateRendererWebPrefs(WebPreferences* prefs) const; | 65 void UpdateRendererWebPrefs(WebPreferences* prefs) const; |
116 | 66 |
117 GpuSwitchingOption GetGpuSwitchingOption() const; | 67 GpuSwitchingOption GetGpuSwitchingOption() const; |
118 | 68 |
119 std::string GetBlacklistVersion() const; | 69 std::string GetBlacklistVersion() const; |
120 | 70 |
121 // Returns the reasons for the latest run of blacklisting decisions. | |
122 // For the structure of returned value, see documentation for | |
123 // GpuBlacklist::GetBlacklistedReasons(). | |
124 // Caller is responsible to release the returned value. | |
125 base::ListValue* GetBlacklistReasons() const; | 71 base::ListValue* GetBlacklistReasons() const; |
126 | 72 |
127 void AddLogMessage(int level, | 73 void AddLogMessage(int level, |
128 const std::string& header, | 74 const std::string& header, |
129 const std::string& message); | 75 const std::string& message); |
130 | 76 |
131 void ProcessCrashed(base::TerminationStatus exit_code); | 77 void ProcessCrashed(base::TerminationStatus exit_code); |
132 | 78 |
133 // Returns a new copy of the ListValue. Caller is responsible to release | |
134 // the returned value. | |
135 base::ListValue* GetLogMessages() const; | 79 base::ListValue* GetLogMessages() const; |
136 | 80 |
137 // Called when switching gpu. | |
138 void HandleGpuSwitch(); | 81 void HandleGpuSwitch(); |
139 | 82 |
140 #if defined(OS_WIN) | 83 #if defined(OS_WIN) |
141 // Is the GPU process using the accelerated surface to present, instead of | 84 // Is the GPU process using the accelerated surface to present, instead of |
142 // presenting by itself. | 85 // presenting by itself. |
143 bool IsUsingAcceleratedSurface() const; | 86 bool IsUsingAcceleratedSurface() const; |
144 #endif | 87 #endif |
145 | 88 |
146 // Maintenance of domains requiring explicit user permission before | 89 void BlockDomainFrom3DAPIs( |
147 // using client-facing 3D APIs (WebGL, Pepper 3D), either because | 90 const GURL& url, GpuDataManagerImpl::DomainGuilt guilt); |
148 // the domain has caused the GPU to reset, or because too many GPU | |
149 // resets have been observed globally recently, and system stability | |
150 // might be compromised. | |
151 // | |
152 // The given URL may be a partial URL (including at least the host) | |
153 // or a full URL to a page. | |
154 // | |
155 // Note that the unblocking API must be part of the content API | |
156 // because it is called from Chrome side code. | |
157 void BlockDomainFrom3DAPIs(const GURL& url, DomainGuilt guilt); | |
158 bool Are3DAPIsBlocked(const GURL& url, | 91 bool Are3DAPIsBlocked(const GURL& url, |
159 int render_process_id, | 92 int render_process_id, |
160 int render_view_id, | 93 int render_view_id, |
161 ThreeDAPIType requester); | 94 ThreeDAPIType requester); |
162 | 95 |
163 // Disables domain blocking for 3D APIs. For use only in tests. | |
164 void DisableDomainBlockingFor3DAPIsForTesting(); | 96 void DisableDomainBlockingFor3DAPIsForTesting(); |
165 | 97 |
166 // Get number of features being blacklisted. | 98 void Notify3DAPIBlocked(const GURL& url, |
| 99 int render_process_id, |
| 100 int render_view_id, |
| 101 ThreeDAPIType requester); |
| 102 |
167 size_t GetBlacklistedFeatureCount() const; | 103 size_t GetBlacklistedFeatureCount() const; |
168 | 104 |
169 typedef base::Callback<void()> GpuSwitchCallback; | 105 virtual ~GpuDataManagerImplPrivate(); |
170 | |
171 // Add and remove gpu switch callback. | |
172 void AddGpuSwitchCallback(const GpuSwitchCallback& callback); | |
173 void RemoveGpuSwitchCallback(const GpuSwitchCallback& callback); | |
174 | 106 |
175 private: | 107 private: |
| 108 friend class GpuDataManagerImplPrivateTest; |
| 109 |
| 110 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 111 GpuSideBlacklisting); |
| 112 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 113 GpuSideExceptions); |
| 114 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 115 DisableHardwareAcceleration); |
| 116 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 117 SwiftShaderRendering); |
| 118 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 119 SwiftShaderRendering2); |
| 120 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 121 GpuInfoUpdate); |
| 122 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 123 NoGpuInfoUpdateWithSwiftShader); |
| 124 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 125 GPUVideoMemoryUsageStatsUpdate); |
| 126 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 127 BlockAllDomainsFrom3DAPIs); |
| 128 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 129 UnblockGuiltyDomainFrom3DAPIs); |
| 130 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 131 UnblockDomainOfUnknownGuiltFrom3DAPIs); |
| 132 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 133 UnblockOtherDomainFrom3DAPIs); |
| 134 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 135 UnblockThisDomainFrom3DAPIs); |
| 136 #if defined(OS_LINUX) |
| 137 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 138 SetGLStrings); |
| 139 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 140 SetGLStringsNoEffects); |
| 141 #endif |
| 142 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 143 GpuDriverBugListSingle); |
| 144 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 145 GpuDriverBugListMultiple); |
| 146 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
| 147 BlacklistAllFeatures); |
| 148 |
176 struct DomainBlockEntry { | 149 struct DomainBlockEntry { |
177 DomainGuilt last_guilt; | 150 GpuDataManagerImpl::DomainGuilt last_guilt; |
178 }; | 151 }; |
179 | 152 |
180 typedef std::map<std::string, DomainBlockEntry> DomainBlockMap; | 153 typedef std::map<std::string, DomainBlockEntry> DomainBlockMap; |
181 | 154 |
182 typedef ObserverListThreadSafe<GpuDataManagerObserver> | 155 typedef ObserverListThreadSafe<GpuDataManagerObserver> |
183 GpuDataManagerObserverList; | 156 GpuDataManagerObserverList; |
184 | 157 |
185 friend class GpuDataManagerImplTest; | 158 GpuDataManagerImplPrivate(); |
186 friend struct DefaultSingletonTraits<GpuDataManagerImpl>; | |
187 | |
188 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, GpuSideBlacklisting); | |
189 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, GpuSideExceptions); | |
190 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, | |
191 DisableHardwareAcceleration); | |
192 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, SwiftShaderRendering); | |
193 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, SwiftShaderRendering2); | |
194 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, GpuInfoUpdate); | |
195 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, | |
196 NoGpuInfoUpdateWithSwiftShader); | |
197 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, | |
198 GPUVideoMemoryUsageStatsUpdate); | |
199 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, | |
200 BlockAllDomainsFrom3DAPIs); | |
201 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, | |
202 UnblockGuiltyDomainFrom3DAPIs); | |
203 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, | |
204 UnblockDomainOfUnknownGuiltFrom3DAPIs); | |
205 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, | |
206 UnblockOtherDomainFrom3DAPIs); | |
207 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, | |
208 UnblockThisDomainFrom3DAPIs); | |
209 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, GpuDriverBugListSingle); | |
210 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplTest, GpuDriverBugListMultiple); | |
211 | |
212 GpuDataManagerImpl(); | |
213 virtual ~GpuDataManagerImpl(); | |
214 | 159 |
215 void InitializeImpl(const std::string& gpu_blacklist_json, | 160 void InitializeImpl(const std::string& gpu_blacklist_json, |
216 const std::string& gpu_switching_list_json, | 161 const std::string& gpu_switching_list_json, |
217 const std::string& gpu_driver_bug_list_json, | 162 const std::string& gpu_driver_bug_list_json, |
218 const GPUInfo& gpu_info); | 163 const GPUInfo& gpu_info); |
219 | 164 |
220 void UpdateBlacklistedFeatures(const std::set<int>& features); | 165 void UpdateBlacklistedFeatures(const std::set<int>& features); |
221 | 166 |
222 // This should only be called once at initialization time, when preliminary | 167 // This should only be called once at initialization time, when preliminary |
223 // gpu info is collected. | 168 // gpu info is collected. |
224 void UpdatePreliminaryBlacklistedFeatures(); | 169 void UpdatePreliminaryBlacklistedFeatures(); |
225 | 170 |
226 // Update the GPU switching status. | 171 // Update the GPU switching status. |
227 // This should only be called once at initialization time. | 172 // This should only be called once at initialization time. |
228 void UpdateGpuSwitchingManager(const GPUInfo& gpu_info); | 173 void UpdateGpuSwitchingManager(const GPUInfo& gpu_info); |
229 | 174 |
230 // Notify all observers whenever there is a GPU info update. | 175 // Notify all observers whenever there is a GPU info update. |
231 void NotifyGpuInfoUpdate(); | 176 void NotifyGpuInfoUpdate(); |
232 | 177 |
233 // Try to switch to SwiftShader rendering, if possible and necessary. | 178 // Try to switch to SwiftShader rendering, if possible and necessary. |
234 void EnableSwiftShaderIfNecessary(); | 179 void EnableSwiftShaderIfNecessary(); |
235 | 180 |
236 // Helper to extract the domain from a given URL. | 181 // Helper to extract the domain from a given URL. |
237 std::string GetDomainFromURL(const GURL& url) const; | 182 std::string GetDomainFromURL(const GURL& url) const; |
238 | 183 |
239 // Implementation functions for blocking of 3D graphics APIs, used | 184 // Implementation functions for blocking of 3D graphics APIs, used |
240 // for unit testing. | 185 // for unit testing. |
241 void BlockDomainFrom3DAPIsAtTime( | 186 void BlockDomainFrom3DAPIsAtTime(const GURL& url, |
242 const GURL& url, DomainGuilt guilt, base::Time at_time); | 187 GpuDataManagerImpl::DomainGuilt guilt, |
243 DomainBlockStatus Are3DAPIsBlockedAtTime( | 188 base::Time at_time); |
| 189 GpuDataManagerImpl::DomainBlockStatus Are3DAPIsBlockedAtTime( |
244 const GURL& url, base::Time at_time) const; | 190 const GURL& url, base::Time at_time) const; |
245 int64 GetBlockAllDomainsDurationInMs() const; | 191 int64 GetBlockAllDomainsDurationInMs() const; |
246 | 192 |
247 void Notify3DAPIBlocked(const GURL& url, | |
248 int render_process_id, | |
249 int render_view_id, | |
250 ThreeDAPIType requester); | |
251 | |
252 bool complete_gpu_info_already_requested_; | 193 bool complete_gpu_info_already_requested_; |
253 | 194 |
254 std::set<int> blacklisted_features_; | 195 std::set<int> blacklisted_features_; |
255 std::set<int> preliminary_blacklisted_features_; | 196 std::set<int> preliminary_blacklisted_features_; |
256 | 197 |
257 GpuSwitchingOption gpu_switching_; | 198 GpuSwitchingOption gpu_switching_; |
258 | 199 |
259 std::set<int> gpu_driver_bugs_; | 200 std::set<int> gpu_driver_bugs_; |
260 | 201 |
261 GPUInfo gpu_info_; | 202 GPUInfo gpu_info_; |
262 mutable base::Lock gpu_info_lock_; | |
263 | 203 |
264 scoped_ptr<GpuBlacklist> gpu_blacklist_; | 204 scoped_ptr<GpuBlacklist> gpu_blacklist_; |
265 scoped_ptr<GpuSwitchingList> gpu_switching_list_; | 205 scoped_ptr<GpuSwitchingList> gpu_switching_list_; |
266 scoped_ptr<GpuDriverBugList> gpu_driver_bug_list_; | 206 scoped_ptr<GpuDriverBugList> gpu_driver_bug_list_; |
267 | 207 |
268 const scoped_refptr<GpuDataManagerObserverList> observer_list_; | 208 const scoped_refptr<GpuDataManagerObserverList> observer_list_; |
269 | 209 |
270 ListValue log_messages_; | 210 ListValue log_messages_; |
271 mutable base::Lock log_messages_lock_; | |
272 | 211 |
273 bool use_swiftshader_; | 212 bool use_swiftshader_; |
274 | 213 |
275 base::FilePath swiftshader_path_; | 214 base::FilePath swiftshader_path_; |
276 | 215 |
277 // Current card force-blacklisted due to GPU crashes, or disabled through | 216 // Current card force-blacklisted due to GPU crashes, or disabled through |
278 // the --disable-gpu commandline switch. | 217 // the --disable-gpu commandline switch. |
279 bool card_blacklisted_; | 218 bool card_blacklisted_; |
280 | 219 |
281 // We disable histogram stuff in testing, especially in unit tests because | 220 // We disable histogram stuff in testing, especially in unit tests because |
282 // they cause random failures. | 221 // they cause random failures. |
283 bool update_histograms_; | 222 bool update_histograms_; |
284 | 223 |
285 // Number of currently open windows, to be used in gpu memory allocation. | 224 // Number of currently open windows, to be used in gpu memory allocation. |
286 int window_count_; | 225 int window_count_; |
287 | 226 |
288 DomainBlockMap blocked_domains_; | 227 DomainBlockMap blocked_domains_; |
289 mutable std::list<base::Time> timestamps_of_gpu_resets_; | 228 mutable std::list<base::Time> timestamps_of_gpu_resets_; |
290 bool domain_blocking_enabled_; | 229 bool domain_blocking_enabled_; |
291 | 230 |
292 std::vector<GpuSwitchCallback> gpu_switch_callbacks_; | 231 GpuDataManagerImpl* owner_; |
293 | 232 |
294 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); | 233 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImplPrivate); |
295 }; | 234 }; |
296 | 235 |
297 } // namespace content | 236 } // namespace content |
298 | 237 |
299 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ | 238 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
| 239 |
OLD | NEW |