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

Side by Side Diff: extensions/common/manifest_handlers/requirements_info.cc

Issue 2737983002: WebGL feature will only enabled when accelerated (Closed)
Patch Set: Reverted WebGL2 change and renamed wegl -> accelerated_webgl Created 3 years, 9 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
« no previous file with comments | « content/public/browser/gpu_data_manager.h ('k') | gpu/config/gpu_blacklist.cc » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "extensions/common/manifest_handlers/requirements_info.h" 5 #include "extensions/common/manifest_handlers/requirements_info.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 !features) { 111 !features) {
112 *error = ErrorUtils::FormatErrorMessageUTF16( 112 *error = ErrorUtils::FormatErrorMessageUTF16(
113 errors::kInvalidRequirement, iter.key()); 113 errors::kInvalidRequirement, iter.key());
114 return false; 114 return false;
115 } 115 }
116 116
117 for (base::ListValue::const_iterator feature_iter = features->begin(); 117 for (base::ListValue::const_iterator feature_iter = features->begin();
118 feature_iter != features->end(); ++feature_iter) { 118 feature_iter != features->end(); ++feature_iter) {
119 std::string feature; 119 std::string feature;
120 if ((*feature_iter)->GetAsString(&feature)) { 120 if ((*feature_iter)->GetAsString(&feature)) {
121 if (feature == "webgl") { 121 if (feature == "accelerated_webgl") {
sugoi1 2017/03/10 21:22:03 I think this one is wrong, will revert.
122 requirements->webgl = true; 122 requirements->webgl = true;
123 } else if (feature == "css3d") { 123 } else if (feature == "css3d") {
124 // css3d is always available, so no check is needed, but no error is 124 // css3d is always available, so no check is needed, but no error is
125 // generated. 125 // generated.
126 } else { 126 } else {
127 *error = ErrorUtils::FormatErrorMessageUTF16( 127 *error = ErrorUtils::FormatErrorMessageUTF16(
128 errors::kInvalidRequirement, iter.key()); 128 errors::kInvalidRequirement, iter.key());
129 return false; 129 return false;
130 } 130 }
131 } 131 }
(...skipping 19 matching lines...) Expand all
151 *error = base::ASCIIToUTF16(errors::kInvalidRequirements); 151 *error = base::ASCIIToUTF16(errors::kInvalidRequirements);
152 return false; 152 return false;
153 } 153 }
154 } 154 }
155 155
156 extension->SetManifestData(keys::kRequirements, std::move(requirements)); 156 extension->SetManifestData(keys::kRequirements, std::move(requirements));
157 return true; 157 return true;
158 } 158 }
159 159
160 } // namespace extensions 160 } // namespace extensions
OLDNEW
« no previous file with comments | « content/public/browser/gpu_data_manager.h ('k') | gpu/config/gpu_blacklist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698