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

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

Issue 1860743002: Add a flag to change when android's progress bar completes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a bad merge Created 4 years, 6 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 (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 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 // On Android, user gestures are normally required, unless that requirement 423 // On Android, user gestures are normally required, unless that requirement
424 // is disabled with a command-line switch or the equivalent field trial is 424 // is disabled with a command-line switch or the equivalent field trial is
425 // is set to "Enabled". 425 // is set to "Enabled".
426 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( 426 const std::string autoplay_group_name = base::FieldTrialList::FindFullName(
427 "MediaElementAutoplay"); 427 "MediaElementAutoplay");
428 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( 428 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch(
429 switches::kDisableGestureRequirementForMediaPlayback) && 429 switches::kDisableGestureRequirementForMediaPlayback) &&
430 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); 430 (autoplay_group_name.empty() || autoplay_group_name != "Enabled");
431 prefs.autoplay_muted_videos_enabled = command_line.HasSwitch( 431 prefs.autoplay_muted_videos_enabled = command_line.HasSwitch(
432 switches::kEnableAutoplayMutedVideos); 432 switches::kEnableAutoplayMutedVideos);
433
434 prefs.progress_bar_completion = GetProgressBarCompletionPolicy();
433 #endif 435 #endif
434 436
435 // Handle autoplay gesture override experiment. 437 // Handle autoplay gesture override experiment.
436 // Note that anything but a well-formed string turns the experiment off. 438 // Note that anything but a well-formed string turns the experiment off.
437 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( 439 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName(
438 "MediaElementGestureOverrideExperiment"); 440 "MediaElementGestureOverrideExperiment");
439 441
440 prefs.touch_enabled = ui::AreTouchEventsEnabled(); 442 prefs.touch_enabled = ui::AreTouchEventsEnabled();
441 prefs.device_supports_touch = prefs.touch_enabled && 443 prefs.device_supports_touch = prefs.touch_enabled &&
442 ui::GetTouchScreensAvailability() == 444 ui::GetTouchScreensAvailability() ==
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 } else { 1325 } else {
1324 render_view_ready_on_process_launch_ = true; 1326 render_view_ready_on_process_launch_ = true;
1325 } 1327 }
1326 } 1328 }
1327 1329
1328 void RenderViewHostImpl::RenderViewReady() { 1330 void RenderViewHostImpl::RenderViewReady() {
1329 delegate_->RenderViewReady(this); 1331 delegate_->RenderViewReady(this);
1330 } 1332 }
1331 1333
1332 } // namespace content 1334 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698