| 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 #endif |
| 454 | 455 |
| 455 // Handle autoplay gesture override experiment. | 456 // Handle autoplay gesture override experiment. |
| 456 // Note that anything but a well-formed string turns the experiment off. | 457 // Note that anything but a well-formed string turns the experiment off. |
| 457 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( | 458 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( |
| 458 "MediaElementGestureOverrideExperiment"); | 459 "MediaElementGestureOverrideExperiment"); |
| 459 #endif | |
| 460 | 460 |
| 461 prefs.touch_enabled = ui::AreTouchEventsEnabled(); | 461 prefs.touch_enabled = ui::AreTouchEventsEnabled(); |
| 462 prefs.device_supports_touch = prefs.touch_enabled && | 462 prefs.device_supports_touch = prefs.touch_enabled && |
| 463 ui::GetTouchScreensAvailability() == | 463 ui::GetTouchScreensAvailability() == |
| 464 ui::TouchScreensAvailability::ENABLED; | 464 ui::TouchScreensAvailability::ENABLED; |
| 465 prefs.available_pointer_types = ui::GetAvailablePointerTypes(); | 465 prefs.available_pointer_types = ui::GetAvailablePointerTypes(); |
| 466 prefs.primary_pointer_type = ui::GetPrimaryPointerType(); | 466 prefs.primary_pointer_type = ui::GetPrimaryPointerType(); |
| 467 prefs.available_hover_types = ui::GetAvailableHoverTypes(); | 467 prefs.available_hover_types = ui::GetAvailableHoverTypes(); |
| 468 prefs.primary_hover_type = ui::GetPrimaryHoverType(); | 468 prefs.primary_hover_type = ui::GetPrimaryHoverType(); |
| 469 | 469 |
| (...skipping 879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 } else { | 1349 } else { |
| 1350 render_view_ready_on_process_launch_ = true; | 1350 render_view_ready_on_process_launch_ = true; |
| 1351 } | 1351 } |
| 1352 } | 1352 } |
| 1353 | 1353 |
| 1354 void RenderViewHostImpl::RenderViewReady() { | 1354 void RenderViewHostImpl::RenderViewReady() { |
| 1355 delegate_->RenderViewReady(this); | 1355 delegate_->RenderViewReady(this); |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 } // namespace content | 1358 } // namespace content |
| OLD | NEW |