| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 | 442 |
| 443 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); | 443 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); |
| 444 | 444 |
| 445 prefs.use_solid_color_scrollbars = true; | 445 prefs.use_solid_color_scrollbars = true; |
| 446 #else // defined(OS_ANDROID) | 446 #else // defined(OS_ANDROID) |
| 447 prefs.cross_origin_media_playback_requires_user_gesture = | 447 prefs.cross_origin_media_playback_requires_user_gesture = |
| 448 base::FeatureList::GetInstance()->IsEnabled( | 448 base::FeatureList::GetInstance()->IsEnabled( |
| 449 features::kCrossOriginMediaPlaybackRequiresUserGesture); | 449 features::kCrossOriginMediaPlaybackRequiresUserGesture); |
| 450 #endif // defined(OS_ANDROID) | 450 #endif // defined(OS_ANDROID) |
| 451 | 451 |
| 452 prefs.device_supports_touch = ui::GetTouchScreensAvailability() == | |
| 453 ui::TouchScreensAvailability::ENABLED; | |
| 454 const std::string touch_enabled_switch = | 452 const std::string touch_enabled_switch = |
| 455 command_line.HasSwitch(switches::kTouchEventFeatureDetection) | 453 command_line.HasSwitch(switches::kTouchEventFeatureDetection) |
| 456 ? command_line.GetSwitchValueASCII( | 454 ? command_line.GetSwitchValueASCII( |
| 457 switches::kTouchEventFeatureDetection) | 455 switches::kTouchEventFeatureDetection) |
| 458 : switches::kTouchEventFeatureDetectionAuto; | 456 : switches::kTouchEventFeatureDetectionAuto; |
| 459 prefs.touch_event_feature_detection_enabled = | 457 prefs.touch_event_feature_detection_enabled = |
| 460 (touch_enabled_switch == switches::kTouchEventFeatureDetectionAuto) | 458 (touch_enabled_switch == switches::kTouchEventFeatureDetectionAuto) |
| 461 ? prefs.device_supports_touch | 459 ? (ui::GetTouchScreensAvailability() == |
| 460 ui::TouchScreensAvailability::ENABLED) |
| 462 : (touch_enabled_switch.empty() || | 461 : (touch_enabled_switch.empty() || |
| 463 touch_enabled_switch == | 462 touch_enabled_switch == |
| 464 switches::kTouchEventFeatureDetectionEnabled); | 463 switches::kTouchEventFeatureDetectionEnabled); |
| 465 std::tie(prefs.available_pointer_types, prefs.available_hover_types) = | 464 std::tie(prefs.available_pointer_types, prefs.available_hover_types) = |
| 466 ui::GetAvailablePointerAndHoverTypes(); | 465 ui::GetAvailablePointerAndHoverTypes(); |
| 467 prefs.primary_pointer_type = | 466 prefs.primary_pointer_type = |
| 468 ui::GetPrimaryPointerType(prefs.available_pointer_types); | 467 ui::GetPrimaryPointerType(prefs.available_pointer_types); |
| 469 prefs.primary_hover_type = | 468 prefs.primary_hover_type = |
| 470 ui::GetPrimaryHoverType(prefs.available_hover_types); | 469 ui::GetPrimaryHoverType(prefs.available_hover_types); |
| 471 | 470 |
| (...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 961 } | 960 } |
| 962 | 961 |
| 963 void RenderViewHostImpl::ClosePageTimeout() { | 962 void RenderViewHostImpl::ClosePageTimeout() { |
| 964 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) | 963 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) |
| 965 return; | 964 return; |
| 966 | 965 |
| 967 ClosePageIgnoringUnloadEvents(); | 966 ClosePageIgnoringUnloadEvents(); |
| 968 } | 967 } |
| 969 | 968 |
| 970 } // namespace content | 969 } // namespace content |
| OLD | NEW |