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

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

Issue 2672983003: Implements PrintBrowser mode. (Closed)
Patch Set: Rebase Created 3 years, 10 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 174
175 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo)) 175 if (command_line.HasSwitch(switches::kForceOverlayFullscreenVideo))
176 WebRuntimeFeatures::forceOverlayFullscreenVideo(true); 176 WebRuntimeFeatures::forceOverlayFullscreenVideo(true);
177 177
178 if (ui::IsOverlayScrollbarEnabled()) 178 if (ui::IsOverlayScrollbarEnabled())
179 WebRuntimeFeatures::enableOverlayScrollbars(true); 179 WebRuntimeFeatures::enableOverlayScrollbars(true);
180 180
181 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo)) 181 if (command_line.HasSwitch(switches::kEnablePreciseMemoryInfo))
182 WebRuntimeFeatures::enablePreciseMemoryInfo(true); 182 WebRuntimeFeatures::enablePreciseMemoryInfo(true);
183 183
184 if (command_line.HasSwitch(switches::kEnablePrintBrowser))
185 WebRuntimeFeatures::enablePrintBrowser(true);
186
184 if (command_line.HasSwitch(switches::kEnableNetworkInformation) || 187 if (command_line.HasSwitch(switches::kEnableNetworkInformation) ||
185 enableExperimentalWebPlatformFeatures) { 188 enableExperimentalWebPlatformFeatures) {
186 WebRuntimeFeatures::enableNetworkInformation(true); 189 WebRuntimeFeatures::enableNetworkInformation(true);
187 } 190 }
188 191
189 if (!base::FeatureList::IsEnabled(features::kCredentialManagementAPI)) 192 if (!base::FeatureList::IsEnabled(features::kCredentialManagementAPI))
190 WebRuntimeFeatures::enableCredentialManagerAPI(false); 193 WebRuntimeFeatures::enableCredentialManagerAPI(false);
191 194
192 if (command_line.HasSwitch(switches::kReducedReferrerGranularity)) 195 if (command_line.HasSwitch(switches::kReducedReferrerGranularity))
193 WebRuntimeFeatures::enableReducedReferrerGranularity(true); 196 WebRuntimeFeatures::enableReducedReferrerGranularity(true);
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) { 374 if (command_line.HasSwitch(switches::kDisableBlinkFeatures)) {
372 std::vector<std::string> disabled_features = base::SplitString( 375 std::vector<std::string> disabled_features = base::SplitString(
373 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures), 376 command_line.GetSwitchValueASCII(switches::kDisableBlinkFeatures),
374 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); 377 ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
375 for (const std::string& feature : disabled_features) 378 for (const std::string& feature : disabled_features)
376 WebRuntimeFeatures::enableFeatureFromString(feature, false); 379 WebRuntimeFeatures::enableFeatureFromString(feature, false);
377 } 380 }
378 } 381 }
379 382
380 } // namespace content 383 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/public/common/content_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698