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

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, 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 159
160 if (base::FeatureList::IsEnabled(features::kScrollAnchoring)) 160 if (base::FeatureList::IsEnabled(features::kScrollAnchoring))
161 WebRuntimeFeatures::enableScrollAnchoring(true); 161 WebRuntimeFeatures::enableScrollAnchoring(true);
162 162
163 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2)) 163 if (command_line.HasSwitch(switches::kEnableSlimmingPaintV2))
164 WebRuntimeFeatures::enableSlimmingPaintV2(true); 164 WebRuntimeFeatures::enableSlimmingPaintV2(true);
165 165
166 if (base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling)) 166 if (base::FeatureList::IsEnabled(features::kRenderingPipelineThrottling))
167 WebRuntimeFeatures::enableRenderingPipelineThrottling(true); 167 WebRuntimeFeatures::enableRenderingPipelineThrottling(true);
168 168
169 if (command_line.HasSwitch(switches::kEnableMediaDocumentDownloadButton))
170 WebRuntimeFeatures::enableMediaDocumentDownloadButton(true);
171
169 // Enable explicitly enabled features, and then disable explicitly disabled 172 // Enable explicitly enabled features, and then disable explicitly disabled
170 // ones. 173 // ones.
171 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) { 174 if (command_line.HasSwitch(switches::kEnableBlinkFeatures)) {
172 std::vector<std::string> enabled_features = base::SplitString( 175 std::vector<std::string> enabled_features = base::SplitString(
173 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures), 176 command_line.GetSwitchValueASCII(switches::kEnableBlinkFeatures),
174 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 177 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
175 for (const std::string& feature : enabled_features) 178 for (const std::string& feature : enabled_features)
176 WebRuntimeFeatures::enableFeatureFromString(feature, true); 179 WebRuntimeFeatures::enableFeatureFromString(feature, true);
177 } 180 }
178 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 181 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
179 std::vector<std::string> disabled_features = base::SplitString( 182 std::vector<std::string> disabled_features = base::SplitString(
180 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 183 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
181 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 184 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
182 for (const std::string& feature : disabled_features) 185 for (const std::string& feature : disabled_features)
183 WebRuntimeFeatures::enableFeatureFromString(feature, false); 186 WebRuntimeFeatures::enableFeatureFromString(feature, false);
184 } 187 }
185 } 188 }
186 189
187 } // namespace content 190 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698