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