| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 #if defined(OS_ANDROID) | 433 #if defined(OS_ANDROID) |
| 434 // On Android, user gestures are normally required, unless that requirement | 434 // On Android, user gestures are normally required, unless that requirement |
| 435 // is disabled with a command-line switch or the equivalent field trial is | 435 // is disabled with a command-line switch or the equivalent field trial is |
| 436 // is set to "Enabled". | 436 // is set to "Enabled". |
| 437 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( | 437 prefs.user_gesture_required_for_media_playback = !command_line.HasSwitch( |
| 438 switches::kDisableGestureRequirementForMediaPlayback); | 438 switches::kDisableGestureRequirementForMediaPlayback); |
| 439 | 439 |
| 440 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); | 440 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); |
| 441 | 441 |
| 442 prefs.use_solid_color_scrollbars = true; | 442 prefs.use_solid_color_scrollbars = true; |
| 443 #endif | 443 #else // defined(OS_ANDROID) |
| 444 prefs.cross_origin_media_playback_requires_user_gesture = |
| 445 base::FeatureList::GetInstance()->IsEnabled( |
| 446 features::kCrossOriginMediaPlaybackRequiresUserGesture); |
| 447 #endif // defined(OS_ANDROID) |
| 444 | 448 |
| 445 prefs.device_supports_touch = ui::GetTouchScreensAvailability() == | 449 prefs.device_supports_touch = ui::GetTouchScreensAvailability() == |
| 446 ui::TouchScreensAvailability::ENABLED; | 450 ui::TouchScreensAvailability::ENABLED; |
| 447 const std::string touch_enabled_switch = | 451 const std::string touch_enabled_switch = |
| 448 command_line.HasSwitch(switches::kTouchEvents) | 452 command_line.HasSwitch(switches::kTouchEvents) |
| 449 ? command_line.GetSwitchValueASCII(switches::kTouchEvents) | 453 ? command_line.GetSwitchValueASCII(switches::kTouchEvents) |
| 450 : switches::kTouchEventsAuto; | 454 : switches::kTouchEventsAuto; |
| 451 prefs.touch_event_api_enabled = | 455 prefs.touch_event_api_enabled = |
| 452 (touch_enabled_switch == switches::kTouchEventsAuto) | 456 (touch_enabled_switch == switches::kTouchEventsAuto) |
| 453 ? prefs.device_supports_touch | 457 ? prefs.device_supports_touch |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1083 } else { | 1087 } else { |
| 1084 render_view_ready_on_process_launch_ = true; | 1088 render_view_ready_on_process_launch_ = true; |
| 1085 } | 1089 } |
| 1086 } | 1090 } |
| 1087 | 1091 |
| 1088 void RenderViewHostImpl::RenderViewReady() { | 1092 void RenderViewHostImpl::RenderViewReady() { |
| 1089 delegate_->RenderViewReady(this); | 1093 delegate_->RenderViewReady(this); |
| 1090 } | 1094 } |
| 1091 | 1095 |
| 1092 } // namespace content | 1096 } // namespace content |
| OLD | NEW |