OLD | NEW |
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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 | 444 |
445 #if defined(OS_ANDROID) | 445 #if defined(OS_ANDROID) |
446 // On Android, user gestures are normally required, unless that requirement | 446 // On Android, user gestures are normally required, unless that requirement |
447 // is disabled with a command-line switch or the equivalent field trial is | 447 // is disabled with a command-line switch or the equivalent field trial is |
448 // is set to "Enabled". | 448 // is set to "Enabled". |
449 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 449 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
450 "MediaElementAutoplay"); | 450 "MediaElementAutoplay"); |
451 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 451 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
452 switches::kDisableGestureRequirementForMediaPlayback) && | 452 switches::kDisableGestureRequirementForMediaPlayback) && |
453 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); | 453 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); |
| 454 |
| 455 prefs.progress_bar_completion = GetProgressBarCompletionOptions(); |
454 #endif | 456 #endif |
455 | 457 |
456 // Handle autoplay gesture override experiment. | 458 // Handle autoplay gesture override experiment. |
457 // Note that anything but a well-formed string turns the experiment off. | 459 // Note that anything but a well-formed string turns the experiment off. |
458 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( | 460 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( |
459 "MediaElementGestureOverrideExperiment"); | 461 "MediaElementGestureOverrideExperiment"); |
460 | 462 |
461 prefs.touch_enabled = ui::AreTouchEventsEnabled(); | 463 prefs.touch_enabled = ui::AreTouchEventsEnabled(); |
462 prefs.device_supports_touch = prefs.touch_enabled && | 464 prefs.device_supports_touch = prefs.touch_enabled && |
463 ui::GetTouchScreensAvailability() == | 465 ui::GetTouchScreensAvailability() == |
(...skipping 885 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 } else { | 1351 } else { |
1350 render_view_ready_on_process_launch_ = true; | 1352 render_view_ready_on_process_launch_ = true; |
1351 } | 1353 } |
1352 } | 1354 } |
1353 | 1355 |
1354 void RenderViewHostImpl::RenderViewReady() { | 1356 void RenderViewHostImpl::RenderViewReady() { |
1355 delegate_->RenderViewReady(this); | 1357 delegate_->RenderViewReady(this); |
1356 } | 1358 } |
1357 | 1359 |
1358 } // namespace content | 1360 } // namespace content |
OLD | NEW |