| 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 ui::GetAvailablePointerAndHoverTypes(); | 470 ui::GetAvailablePointerAndHoverTypes(); |
| 471 prefs.primary_pointer_type = | 471 prefs.primary_pointer_type = |
| 472 ui::GetPrimaryPointerType(prefs.available_pointer_types); | 472 ui::GetPrimaryPointerType(prefs.available_pointer_types); |
| 473 prefs.primary_hover_type = | 473 prefs.primary_hover_type = |
| 474 ui::GetPrimaryHoverType(prefs.available_hover_types); | 474 ui::GetPrimaryHoverType(prefs.available_hover_types); |
| 475 | 475 |
| 476 #if defined(OS_ANDROID) | 476 #if defined(OS_ANDROID) |
| 477 prefs.video_fullscreen_orientation_lock_enabled = | 477 prefs.video_fullscreen_orientation_lock_enabled = |
| 478 base::FeatureList::IsEnabled(media::kVideoFullscreenOrientationLock) && | 478 base::FeatureList::IsEnabled(media::kVideoFullscreenOrientationLock) && |
| 479 ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_PHONE; | 479 ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_PHONE; |
| 480 prefs.video_rotate_to_fullscreen_enabled = |
| 481 base::FeatureList::IsEnabled(media::kVideoRotateToFullscreen) && |
| 482 ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_PHONE; |
| 480 #endif | 483 #endif |
| 481 | 484 |
| 482 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); | 485 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); |
| 483 | 486 |
| 484 prefs.touch_adjustment_enabled = | 487 prefs.touch_adjustment_enabled = |
| 485 !command_line.HasSwitch(switches::kDisableTouchAdjustment); | 488 !command_line.HasSwitch(switches::kDisableTouchAdjustment); |
| 486 | 489 |
| 487 prefs.enable_scroll_animator = | 490 prefs.enable_scroll_animator = |
| 488 command_line.HasSwitch(switches::kEnableSmoothScrolling) || | 491 command_line.HasSwitch(switches::kEnableSmoothScrolling) || |
| 489 (!command_line.HasSwitch(switches::kDisableSmoothScrolling) && | 492 (!command_line.HasSwitch(switches::kDisableSmoothScrolling) && |
| (...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 } | 959 } |
| 957 | 960 |
| 958 void RenderViewHostImpl::ClosePageTimeout() { | 961 void RenderViewHostImpl::ClosePageTimeout() { |
| 959 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) | 962 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) |
| 960 return; | 963 return; |
| 961 | 964 |
| 962 ClosePageIgnoringUnloadEvents(); | 965 ClosePageIgnoringUnloadEvents(); |
| 963 } | 966 } |
| 964 | 967 |
| 965 } // namespace content | 968 } // namespace content |
| OLD | NEW |