OLD | NEW |
1 // Copyright (c) 2013 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_PRIVATE_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
8 #include <list> | 11 #include <list> |
9 #include <map> | 12 #include <map> |
10 #include <set> | 13 #include <set> |
11 #include <string> | 14 #include <string> |
12 #include <vector> | 15 #include <vector> |
13 | 16 |
14 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
| 18 #include "base/macros.h" |
15 #include "base/memory/ref_counted.h" | 19 #include "base/memory/ref_counted.h" |
16 #include "base/memory/singleton.h" | 20 #include "base/memory/singleton.h" |
17 #include "base/observer_list_threadsafe.h" | 21 #include "base/observer_list_threadsafe.h" |
| 22 #include "build/build_config.h" |
18 #include "content/browser/gpu/gpu_data_manager_impl.h" | 23 #include "content/browser/gpu/gpu_data_manager_impl.h" |
19 #include "gpu/config/gpu_blacklist.h" | 24 #include "gpu/config/gpu_blacklist.h" |
20 #include "gpu/config/gpu_driver_bug_list.h" | 25 #include "gpu/config/gpu_driver_bug_list.h" |
21 | 26 |
22 namespace base { | 27 namespace base { |
23 class CommandLine; | 28 class CommandLine; |
24 } | 29 } |
25 | 30 |
26 namespace content { | 31 namespace content { |
27 | 32 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 void Notify3DAPIBlocked(const GURL& top_origin_url, | 112 void Notify3DAPIBlocked(const GURL& top_origin_url, |
108 int render_process_id, | 113 int render_process_id, |
109 int render_frame_id, | 114 int render_frame_id, |
110 ThreeDAPIType requester); | 115 ThreeDAPIType requester); |
111 | 116 |
112 size_t GetBlacklistedFeatureCount() const; | 117 size_t GetBlacklistedFeatureCount() const; |
113 | 118 |
114 void SetDisplayCount(unsigned int display_count); | 119 void SetDisplayCount(unsigned int display_count); |
115 unsigned int GetDisplayCount() const; | 120 unsigned int GetDisplayCount() const; |
116 | 121 |
117 bool UpdateActiveGpu(uint32 vendor_id, uint32 device_id); | 122 bool UpdateActiveGpu(uint32_t vendor_id, uint32_t device_id); |
118 | 123 |
119 void OnGpuProcessInitFailure(); | 124 void OnGpuProcessInitFailure(); |
120 | 125 |
121 virtual ~GpuDataManagerImplPrivate(); | 126 virtual ~GpuDataManagerImplPrivate(); |
122 | 127 |
123 private: | 128 private: |
124 friend class GpuDataManagerImplPrivateTest; | 129 friend class GpuDataManagerImplPrivateTest; |
125 | 130 |
126 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, | 131 FRIEND_TEST_ALL_PREFIXES(GpuDataManagerImplPrivateTest, |
127 GpuSideBlacklisting); | 132 GpuSideBlacklisting); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 // Helper to extract the domain from a given URL. | 225 // Helper to extract the domain from a given URL. |
221 std::string GetDomainFromURL(const GURL& url) const; | 226 std::string GetDomainFromURL(const GURL& url) const; |
222 | 227 |
223 // Implementation functions for blocking of 3D graphics APIs, used | 228 // Implementation functions for blocking of 3D graphics APIs, used |
224 // for unit testing. | 229 // for unit testing. |
225 void BlockDomainFrom3DAPIsAtTime(const GURL& url, | 230 void BlockDomainFrom3DAPIsAtTime(const GURL& url, |
226 GpuDataManagerImpl::DomainGuilt guilt, | 231 GpuDataManagerImpl::DomainGuilt guilt, |
227 base::Time at_time); | 232 base::Time at_time); |
228 GpuDataManagerImpl::DomainBlockStatus Are3DAPIsBlockedAtTime( | 233 GpuDataManagerImpl::DomainBlockStatus Are3DAPIsBlockedAtTime( |
229 const GURL& url, base::Time at_time) const; | 234 const GURL& url, base::Time at_time) const; |
230 int64 GetBlockAllDomainsDurationInMs() const; | 235 int64_t GetBlockAllDomainsDurationInMs() const; |
231 | 236 |
232 bool complete_gpu_info_already_requested_; | 237 bool complete_gpu_info_already_requested_; |
233 | 238 |
234 std::set<int> blacklisted_features_; | 239 std::set<int> blacklisted_features_; |
235 std::set<int> preliminary_blacklisted_features_; | 240 std::set<int> preliminary_blacklisted_features_; |
236 | 241 |
237 std::set<int> gpu_driver_bugs_; | 242 std::set<int> gpu_driver_bugs_; |
238 | 243 |
239 gpu::GPUInfo gpu_info_; | 244 gpu::GPUInfo gpu_info_; |
240 | 245 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 bool finalized_; | 281 bool finalized_; |
277 | 282 |
278 std::string disabled_extensions_; | 283 std::string disabled_extensions_; |
279 | 284 |
280 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImplPrivate); | 285 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImplPrivate); |
281 }; | 286 }; |
282 | 287 |
283 } // namespace content | 288 } // namespace content |
284 | 289 |
285 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ | 290 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_PRIVATE_H_ |
OLD | NEW |