| 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_BROWSER_GPU_GPU_BLACKLIST_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ |
| 6 #define CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ | 6 #define CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/values.h" | 15 #include "base/values.h" |
| 16 #include "build/build_config.h" | 16 #include "build/build_config.h" |
| 17 #include "content/common/content_export.h" | 17 #include "content/common/content_export.h" |
| 18 #include "content/public/common/gpu_feature_type.h" | 18 #include "content/public/common/gpu_feature_type.h" |
| 19 #include "content/public/common/gpu_switching_option.h" | |
| 20 | 19 |
| 21 class Version; | 20 class Version; |
| 22 | 21 |
| 23 namespace content { | 22 namespace content { |
| 24 struct GPUInfo; | 23 struct GPUInfo; |
| 25 } | 24 } |
| 26 | 25 |
| 27 class CONTENT_EXPORT GpuBlacklist { | 26 class CONTENT_EXPORT GpuBlacklist { |
| 28 public: | 27 public: |
| 29 enum OsType { | 28 enum OsType { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 41 // In loading, keep all entries. This is for testing only. | 40 // In loading, keep all entries. This is for testing only. |
| 42 kAllOs | 41 kAllOs |
| 43 }; | 42 }; |
| 44 | 43 |
| 45 struct Decision { | 44 struct Decision { |
| 46 content::GpuFeatureType blacklisted_features; | 45 content::GpuFeatureType blacklisted_features; |
| 47 content::GpuSwitchingOption gpu_switching; | 46 content::GpuSwitchingOption gpu_switching; |
| 48 | 47 |
| 49 Decision() | 48 Decision() |
| 50 : blacklisted_features(content::GPU_FEATURE_TYPE_UNKNOWN), | 49 : blacklisted_features(content::GPU_FEATURE_TYPE_UNKNOWN), |
| 51 gpu_switching(content::GPU_SWITCHING_OPTION_UNKNOWN) { | 50 gpu_switching(content::GPU_SWITCHING_AUTOMATIC) { |
| 52 } | 51 } |
| 53 }; | 52 }; |
| 54 | 53 |
| 55 GpuBlacklist(); | 54 GpuBlacklist(); |
| 56 virtual ~GpuBlacklist(); | 55 virtual ~GpuBlacklist(); |
| 57 | 56 |
| 58 // Loads blacklist information from a json file. | 57 // Loads blacklist information from a json file. |
| 59 // If failed, the current GpuBlacklist is un-touched. | 58 // If failed, the current GpuBlacklist is un-touched. |
| 60 bool LoadGpuBlacklist(const std::string& json_context, OsFilter os_filter); | 59 bool LoadGpuBlacklist(const std::string& json_context, OsFilter os_filter); |
| 61 bool LoadGpuBlacklist(const std::string& browser_version_string, | 60 bool LoadGpuBlacklist(const std::string& browser_version_string, |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 | 399 |
| 401 uint32 max_entry_id_; | 400 uint32 max_entry_id_; |
| 402 | 401 |
| 403 bool contains_unknown_fields_; | 402 bool contains_unknown_fields_; |
| 404 | 403 |
| 405 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); | 404 DISALLOW_COPY_AND_ASSIGN(GpuBlacklist); |
| 406 }; | 405 }; |
| 407 | 406 |
| 408 #endif // CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ | 407 #endif // CONTENT_BROWSER_GPU_GPU_BLACKLIST_H_ |
| 409 | 408 |
| OLD | NEW |