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

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

Powered by Google App Engine
This is Rietveld 408576698