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 CHROME_BROWSER_GPU_BLACKLIST_H_ | 5 #ifndef CHROME_BROWSER_GPU_BLACKLIST_H_ |
6 #define CHROME_BROWSER_GPU_BLACKLIST_H_ | 6 #define CHROME_BROWSER_GPU_BLACKLIST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 void Clear(); | 378 void Clear(); |
379 | 379 |
380 // Check if the entry is supported by the current version of browser. | 380 // Check if the entry is supported by the current version of browser. |
381 // By default, if there is no browser version information in the entry, | 381 // By default, if there is no browser version information in the entry, |
382 // return kSupported; | 382 // return kSupported; |
383 BrowserVersionSupport IsEntrySupportedByCurrentBrowserVersion( | 383 BrowserVersionSupport IsEntrySupportedByCurrentBrowserVersion( |
384 const base::DictionaryValue* value); | 384 const base::DictionaryValue* value); |
385 | 385 |
386 // GpuDataManager::Observer implementation. | 386 // GpuDataManager::Observer implementation. |
387 virtual void OnGpuInfoUpdate() OVERRIDE; | 387 virtual void OnGpuInfoUpdate() OVERRIDE; |
| 388 virtual void OnVideoMemoryUsageStatsUpdate( |
| 389 const content::GPUVideoMemoryUsageStats& video_memory) OVERRIDE {} |
388 | 390 |
389 // Returns the number of entries. This is only for tests. | 391 // Returns the number of entries. This is only for tests. |
390 size_t num_entries() const; | 392 size_t num_entries() const; |
391 | 393 |
392 // Check if any entries contain unknown fields. This is only for tests. | 394 // Check if any entries contain unknown fields. This is only for tests. |
393 bool contains_unknown_fields() const { return contains_unknown_fields_; } | 395 bool contains_unknown_fields() const { return contains_unknown_fields_; } |
394 | 396 |
395 static NumericOp StringToNumericOp(const std::string& op); | 397 static NumericOp StringToNumericOp(const std::string& op); |
396 | 398 |
397 scoped_ptr<Version> version_; | 399 scoped_ptr<Version> version_; |
398 std::vector<ScopedGpuBlacklistEntry> blacklist_; | 400 std::vector<ScopedGpuBlacklistEntry> blacklist_; |
399 | 401 |
400 scoped_ptr<Version> browser_version_; | 402 scoped_ptr<Version> browser_version_; |
401 | 403 |
402 // This records all the blacklist entries that are appliable to the current | 404 // This records all the blacklist entries that are appliable to the current |
403 // user machine. It is updated everytime DetermineGpuFeatureType() is | 405 // user machine. It is updated everytime DetermineGpuFeatureType() is |
404 // called and is used later by GetGpuFeatureTypeEntries(). | 406 // called and is used later by GetGpuFeatureTypeEntries(). |
405 std::vector<ScopedGpuBlacklistEntry> active_entries_; | 407 std::vector<ScopedGpuBlacklistEntry> active_entries_; |
406 | 408 |
407 uint32 max_entry_id_; | 409 uint32 max_entry_id_; |
408 | 410 |
409 bool contains_unknown_fields_; | 411 bool contains_unknown_fields_; |
410 | 412 |
411 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); | 413 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); |
412 }; | 414 }; |
413 | 415 |
414 #endif // CHROME_BROWSER_GPU_BLACKLIST_H_ | 416 #endif // CHROME_BROWSER_GPU_BLACKLIST_H_ |
OLD | NEW |