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

Side by Side Diff: content/child/runtime_features.cc

Issue 1780043002: Add download button to MediaDocument on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 8 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/child/blink_platform_impl.cc ('k') | content/public/common/content_features.h » ('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 "content/child/runtime_features.h" 5 #include "content/child/runtime_features.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/feature_list.h" 10 #include "base/feature_list.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 WebRuntimeFeatures::enableRenderingPipelineThrottling(true); 181 WebRuntimeFeatures::enableRenderingPipelineThrottling(true);
182 182
183 // Note that it might already by true for OS_ANDROID, above. This is for 183 // Note that it might already by true for OS_ANDROID, above. This is for
184 // non-android versions. 184 // non-android versions.
185 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi)) 185 if (base::FeatureList::IsEnabled(features::kNewMediaPlaybackUi))
186 WebRuntimeFeatures::enableNewMediaPlaybackUi(true); 186 WebRuntimeFeatures::enableNewMediaPlaybackUi(true);
187 187
188 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator)) 188 if (base::FeatureList::IsEnabled(features::kDocumentWriteEvaluator))
189 WebRuntimeFeatures::enableDocumentWriteEvaluator(true); 189 WebRuntimeFeatures::enableDocumentWriteEvaluator(true);
190 190
191 WebRuntimeFeatures::enableMediaDocumentDownloadButton(
192 base::FeatureList::IsEnabled(features::kMediaDocumentDownloadButton));
193
191 // Enable explicitly enabled features, and then disable explicitly disabled 194 // Enable explicitly enabled features, and then disable explicitly disabled
192 // ones. 195 // ones.
193 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 196 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
194 std::vector<std::string> enabled_features = base::SplitString( 197 std::vector<std::string> enabled_features = base::SplitString(
195 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 198 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
196 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 199 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
197 for (const std::string& feature : enabled_features) 200 for (const std::string& feature : enabled_features)
198 WebRuntimeFeatures::enableFeatureFromString(feature, true); 201 WebRuntimeFeatures::enableFeatureFromString(feature, true);
199 } 202 }
200 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 203 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
201 std::vector<std::string> disabled_features = base::SplitString( 204 std::vector<std::string> disabled_features = base::SplitString(
202 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 205 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
203 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 206 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
204 for (const std::string& feature : disabled_features) 207 for (const std::string& feature : disabled_features)
205 WebRuntimeFeatures::enableFeatureFromString(feature, false); 208 WebRuntimeFeatures::enableFeatureFromString(feature, false);
206 } 209 }
207 } 210 }
208 211
209 } // namespace content 212 } // namespace content
OLDNEW
« no previous file with comments | « content/child/blink_platform_impl.cc ('k') | content/public/common/content_features.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698