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

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: using flexbox Created 4 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
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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 if (base::FeatureList::IsEnabled(features::kScrollAnchoring)) 174 if (base::FeatureList::IsEnabled(features::kScrollAnchoring))
175 WebRuntimeFeatures::enableScrollAnchoring(true); 175 WebRuntimeFeatures::enableScrollAnchoring(true);
176 176
177 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) 177 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2))
178 WebRuntimeFeatures::enableSlimmingPaintV2(true); 178 WebRuntimeFeatures::enableSlimmingPaintV2(true);
179 179
180 if (base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)) 180 if (base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling))
181 WebRuntimeFeatures::enableRenderingPipelineThrottling(true); 181 WebRuntimeFeatures::enableRenderingPipelineThrottling(true);
182 182
183 if (command_line.HasSwitch(switches::kEnableMediaDocumentDownloadButton))
184 WebRuntimeFeatures::enableMediaDocumentDownloadButton(true);
185
183 // Enable explicitly enabled features, and then disable explicitly disabled 186 // Enable explicitly enabled features, and then disable explicitly disabled
184 // ones. 187 // ones.
185 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 188 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
186 std::vector<std::string> enabled_features = base::SplitString( 189 std::vector<std::string> enabled_features = base::SplitString(
187 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 190 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
188 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 191 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
189 for (const std::string& feature : enabled_features) 192 for (const std::string& feature : enabled_features)
190 WebRuntimeFeatures::enableFeatureFromString(feature, true); 193 WebRuntimeFeatures::enableFeatureFromString(feature, true);
191 } 194 }
192 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 195 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
193 std::vector<std::string> disabled_features = base::SplitString( 196 std::vector<std::string> disabled_features = base::SplitString(
194 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 197 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
195 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 198 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
196 for (const std::string& feature : disabled_features) 199 for (const std::string& feature : disabled_features)
197 WebRuntimeFeatures::enableFeatureFromString(feature, false); 200 WebRuntimeFeatures::enableFeatureFromString(feature, false);
198 } 201 }
199 } 202 }
200 203
201 } // namespace content 204 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698