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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2886943007: Introduce NavigatorWebDriver interface
Patch Set: Introduce NavigatorWebDriver interface Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index 083e53b5c6842c9ea688b372458141dc20bf914d..717c8745263b02b8605ea6ed3b852189172c99fd 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -107,6 +107,8 @@ using blink::WebInputEvent;
using blink::WebMediaPlayerAction;
using blink::WebPluginAction;
+const char kEnableAutomation[] = "enable-automation";
bokan 2017/05/19 16:43:23 This should go in content_switches.cc/h
+
namespace content {
namespace {
@@ -554,6 +556,12 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
if (delegate_ && delegate_->HasPersistentVideo())
prefs.media_controls_enabled = false;
+ if (command_line.HasSwitch(kEnableAutomation))
+ prefs.automation_controlled = true;
+
+ if (command_line.HasSwitch(switches::kHeadless))
+ prefs.headless = true;
bokan 2017/05/19 16:43:23 Would it make sense to just set automation_control
+
prefs.background_video_track_optimization_enabled =
base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization);
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | content/public/common/web_preferences.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698