| 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 // is set to "Enabled". | 435 // is set to "Enabled". |
| 436 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( | 436 const std::string autoplay_group_name = base::FieldTrialList::FindFullName( |
| 437 "MediaElementAutoplay"); | 437 "MediaElementAutoplay"); |
| 438 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 438 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
| 439 switches::kDisableGestureRequirementForMediaPlayback) && | 439 switches::kDisableGestureRequirementForMediaPlayback) && |
| 440 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); | 440 (autoplay_group_name.empty() || autoplay_group_name != "Enabled"); |
| 441 | 441 |
| 442 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); | 442 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); |
| 443 | 443 |
| 444 prefs.use_solid_color_scrollbars = true; | 444 prefs.use_solid_color_scrollbars = true; |
| 445 #else |
| 446 prefs.cross_origin_media_playback_requires_user_gesture = |
| 447 base::FeatureList::GetInstance()->IsEnabled( |
| 448 features::kCrossOriginMediaPlaybackRequiresUserGesture); |
| 445 #endif | 449 #endif |
| 446 | 450 |
| 447 // Handle autoplay gesture override experiment. | 451 // Handle autoplay gesture override experiment. |
| 448 // Note that anything but a well-formed string turns the experiment off. | 452 // Note that anything but a well-formed string turns the experiment off. |
| 449 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( | 453 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( |
| 450 "MediaElementGestureOverrideExperiment"); | 454 "MediaElementGestureOverrideExperiment"); |
| 451 | 455 |
| 452 prefs.touch_enabled = ui::AreTouchEventsEnabled(); | 456 prefs.touch_enabled = ui::AreTouchEventsEnabled(); |
| 453 prefs.device_supports_touch = prefs.touch_enabled && | 457 prefs.device_supports_touch = prefs.touch_enabled && |
| 454 ui::GetTouchScreensAvailability() == | 458 ui::GetTouchScreensAvailability() == |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1073 } else { | 1077 } else { |
| 1074 render_view_ready_on_process_launch_ = true; | 1078 render_view_ready_on_process_launch_ = true; |
| 1075 } | 1079 } |
| 1076 } | 1080 } |
| 1077 | 1081 |
| 1078 void RenderViewHostImpl::RenderViewReady() { | 1082 void RenderViewHostImpl::RenderViewReady() { |
| 1079 delegate_->RenderViewReady(this); | 1083 delegate_->RenderViewReady(this); |
| 1080 } | 1084 } |
| 1081 | 1085 |
| 1082 } // namespace content | 1086 } // namespace content |
| OLD | NEW |