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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2886943007: Introduce NavigatorWebDriver interface
Patch Set: wip: need more tests 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 prefs.user_gesture_required_for_presentation = !command_line.HasSwitch( 547 prefs.user_gesture_required_for_presentation = !command_line.HasSwitch(
548 switches::kDisableGestureRequirementForPresentation); 548 switches::kDisableGestureRequirementForPresentation);
549 549
550 if (delegate_ && delegate_->HideDownloadUI()) 550 if (delegate_ && delegate_->HideDownloadUI())
551 prefs.hide_download_ui = true; 551 prefs.hide_download_ui = true;
552 552
553 // `media_controls_enabled` is `true` by default. 553 // `media_controls_enabled` is `true` by default.
554 if (delegate_ && delegate_->HasPersistentVideo()) 554 if (delegate_ && delegate_->HasPersistentVideo())
555 prefs.media_controls_enabled = false; 555 prefs.media_controls_enabled = false;
556 556
557 prefs.automation_controlled =
558 command_line.HasSwitch(switches::kEnableAutomation) ||
559 command_line.HasSwitch(switches::kHeadless);
560
557 prefs.background_video_track_optimization_enabled = 561 prefs.background_video_track_optimization_enabled =
558 base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization); 562 base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization);
559 563
560 // TODO(servolk, asvitkine): Query the value directly when it is available in 564 // TODO(servolk, asvitkine): Query the value directly when it is available in
561 // the renderer process. See https://crbug.com/681160. 565 // the renderer process. See https://crbug.com/681160.
562 prefs.enable_instant_source_buffer_gc = 566 prefs.enable_instant_source_buffer_gc =
563 variations::GetVariationParamByFeatureAsBool( 567 variations::GetVariationParamByFeatureAsBool(
564 media::kMemoryPressureBasedSourceBufferGC, 568 media::kMemoryPressureBasedSourceBufferGC,
565 "enable_instant_source_buffer_gc", false); 569 "enable_instant_source_buffer_gc", false);
566 570
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 } 965 }
962 966
963 void RenderViewHostImpl::ClosePageTimeout() { 967 void RenderViewHostImpl::ClosePageTimeout() {
964 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) 968 if (delegate_->ShouldIgnoreUnresponsiveRenderer())
965 return; 969 return;
966 970
967 ClosePageIgnoringUnloadEvents(); 971 ClosePageIgnoringUnloadEvents();
968 } 972 }
969 973
970 } // namespace content 974 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698