| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 #include "content/public/common/file_chooser_file_info.h" | 78 #include "content/public/common/file_chooser_file_info.h" |
| 79 #include "content/public/common/file_chooser_params.h" | 79 #include "content/public/common/file_chooser_params.h" |
| 80 #include "content/public/common/result_codes.h" | 80 #include "content/public/common/result_codes.h" |
| 81 #include "content/public/common/url_constants.h" | 81 #include "content/public/common/url_constants.h" |
| 82 #include "content/public/common/url_utils.h" | 82 #include "content/public/common/url_utils.h" |
| 83 #include "media/base/media_switches.h" | 83 #include "media/base/media_switches.h" |
| 84 #include "net/base/url_util.h" | 84 #include "net/base/url_util.h" |
| 85 #include "net/url_request/url_request_context_getter.h" | 85 #include "net/url_request/url_request_context_getter.h" |
| 86 #include "third_party/skia/include/core/SkBitmap.h" | 86 #include "third_party/skia/include/core/SkBitmap.h" |
| 87 #include "ui/base/clipboard/clipboard.h" | 87 #include "ui/base/clipboard/clipboard.h" |
| 88 #include "ui/base/device_form_factor.h" |
| 88 #include "ui/base/touch/touch_device.h" | 89 #include "ui/base/touch/touch_device.h" |
| 89 #include "ui/base/ui_base_switches.h" | 90 #include "ui/base/ui_base_switches.h" |
| 90 #include "ui/gfx/animation/animation.h" | 91 #include "ui/gfx/animation/animation.h" |
| 91 #include "ui/gfx/color_space.h" | 92 #include "ui/gfx/color_space.h" |
| 92 #include "ui/gfx/image/image_skia.h" | 93 #include "ui/gfx/image/image_skia.h" |
| 93 #include "ui/gfx/native_widget_types.h" | 94 #include "ui/gfx/native_widget_types.h" |
| 94 #include "ui/native_theme/native_theme_switches.h" | 95 #include "ui/native_theme/native_theme_switches.h" |
| 95 #include "url/url_constants.h" | 96 #include "url/url_constants.h" |
| 96 | 97 |
| 97 #if defined(OS_WIN) | 98 #if defined(OS_WIN) |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 462 ui::GetAvailablePointerAndHoverTypes(); | 463 ui::GetAvailablePointerAndHoverTypes(); |
| 463 prefs.primary_pointer_type = | 464 prefs.primary_pointer_type = |
| 464 ui::GetPrimaryPointerType(prefs.available_pointer_types); | 465 ui::GetPrimaryPointerType(prefs.available_pointer_types); |
| 465 prefs.primary_hover_type = | 466 prefs.primary_hover_type = |
| 466 ui::GetPrimaryHoverType(prefs.available_hover_types); | 467 ui::GetPrimaryHoverType(prefs.available_hover_types); |
| 467 | 468 |
| 468 #if defined(OS_ANDROID) | 469 #if defined(OS_ANDROID) |
| 469 prefs.device_supports_mouse = false; | 470 prefs.device_supports_mouse = false; |
| 470 | 471 |
| 471 prefs.video_fullscreen_orientation_lock_enabled = | 472 prefs.video_fullscreen_orientation_lock_enabled = |
| 472 base::FeatureList::IsEnabled(media::kVideoFullscreenOrientationLock); | 473 base::FeatureList::IsEnabled(media::kVideoFullscreenOrientationLock) && |
| 474 ui::GetDeviceFormFactor() == ui::DEVICE_FORM_FACTOR_PHONE; |
| 473 #endif | 475 #endif |
| 474 | 476 |
| 475 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); | 477 prefs.pointer_events_max_touch_points = ui::MaxTouchPoints(); |
| 476 | 478 |
| 477 prefs.touch_adjustment_enabled = | 479 prefs.touch_adjustment_enabled = |
| 478 !command_line.HasSwitch(switches::kDisableTouchAdjustment); | 480 !command_line.HasSwitch(switches::kDisableTouchAdjustment); |
| 479 | 481 |
| 480 prefs.enable_scroll_animator = | 482 prefs.enable_scroll_animator = |
| 481 command_line.HasSwitch(switches::kEnableSmoothScrolling) || | 483 command_line.HasSwitch(switches::kEnableSmoothScrolling) || |
| 482 (!command_line.HasSwitch(switches::kDisableSmoothScrolling) && | 484 (!command_line.HasSwitch(switches::kDisableSmoothScrolling) && |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1092 } else { | 1094 } else { |
| 1093 render_view_ready_on_process_launch_ = true; | 1095 render_view_ready_on_process_launch_ = true; |
| 1094 } | 1096 } |
| 1095 } | 1097 } |
| 1096 | 1098 |
| 1097 void RenderViewHostImpl::RenderViewReady() { | 1099 void RenderViewHostImpl::RenderViewReady() { |
| 1098 delegate_->RenderViewReady(this); | 1100 delegate_->RenderViewReady(this); |
| 1099 } | 1101 } |
| 1100 | 1102 |
| 1101 } // namespace content | 1103 } // namespace content |
| OLD | NEW |