| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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/touch/touch_device.h" | 88 #include "ui/base/touch/touch_device.h" |
| 89 #include "ui/base/ui_base_switches.h" | 89 #include "ui/base/ui_base_switches.h" |
| 90 #include "ui/events/event_switches.h" | |
| 91 #include "ui/gfx/animation/animation.h" | 90 #include "ui/gfx/animation/animation.h" |
| 92 #include "ui/gfx/color_space.h" | 91 #include "ui/gfx/color_space.h" |
| 93 #include "ui/gfx/image/image_skia.h" | 92 #include "ui/gfx/image/image_skia.h" |
| 94 #include "ui/gfx/native_widget_types.h" | 93 #include "ui/gfx/native_widget_types.h" |
| 95 #include "ui/native_theme/native_theme_switches.h" | 94 #include "ui/native_theme/native_theme_switches.h" |
| 96 #include "url/url_constants.h" | 95 #include "url/url_constants.h" |
| 97 | 96 |
| 98 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
| 99 #include "ui/display/win/screen_win.h" | 98 #include "ui/display/win/screen_win.h" |
| 100 #include "ui/gfx/geometry/dip_util.h" | 99 #include "ui/gfx/geometry/dip_util.h" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 prefs.use_solid_color_scrollbars = true; | 441 prefs.use_solid_color_scrollbars = true; |
| 443 #else // defined(OS_ANDROID) | 442 #else // defined(OS_ANDROID) |
| 444 prefs.cross_origin_media_playback_requires_user_gesture = | 443 prefs.cross_origin_media_playback_requires_user_gesture = |
| 445 base::FeatureList::GetInstance()->IsEnabled( | 444 base::FeatureList::GetInstance()->IsEnabled( |
| 446 features::kCrossOriginMediaPlaybackRequiresUserGesture); | 445 features::kCrossOriginMediaPlaybackRequiresUserGesture); |
| 447 #endif // defined(OS_ANDROID) | 446 #endif // defined(OS_ANDROID) |
| 448 | 447 |
| 449 prefs.device_supports_touch = ui::GetTouchScreensAvailability() == | 448 prefs.device_supports_touch = ui::GetTouchScreensAvailability() == |
| 450 ui::TouchScreensAvailability::ENABLED; | 449 ui::TouchScreensAvailability::ENABLED; |
| 451 const std::string touch_enabled_switch = | 450 const std::string touch_enabled_switch = |
| 452 command_line.HasSwitch(switches::kTouchEvents) | 451 command_line.HasSwitch(switches::kTouchEventFeatureDetection) |
| 453 ? command_line.GetSwitchValueASCII(switches::kTouchEvents) | 452 ? command_line.GetSwitchValueASCII( |
| 454 : switches::kTouchEventsAuto; | 453 switches::kTouchEventFeatureDetection) |
| 455 prefs.touch_event_api_enabled = | 454 : switches::kTouchEventFeatureDetectionAuto; |
| 456 (touch_enabled_switch == switches::kTouchEventsAuto) | 455 prefs.touch_event_feature_detection_enabled = |
| 456 (touch_enabled_switch == switches::kTouchEventFeatureDetectionAuto) |
| 457 ? prefs.device_supports_touch | 457 ? prefs.device_supports_touch |
| 458 : (touch_enabled_switch.empty() || | 458 : (touch_enabled_switch.empty() || |
| 459 touch_enabled_switch == switches::kTouchEventsEnabled); | 459 touch_enabled_switch == |
| 460 switches::kTouchEventFeatureDetectionEnabled); |
| 460 std::tie(prefs.available_pointer_types, prefs.available_hover_types) = | 461 std::tie(prefs.available_pointer_types, prefs.available_hover_types) = |
| 461 ui::GetAvailablePointerAndHoverTypes(); | 462 ui::GetAvailablePointerAndHoverTypes(); |
| 462 prefs.primary_pointer_type = | 463 prefs.primary_pointer_type = |
| 463 ui::GetPrimaryPointerType(prefs.available_pointer_types); | 464 ui::GetPrimaryPointerType(prefs.available_pointer_types); |
| 464 prefs.primary_hover_type = | 465 prefs.primary_hover_type = |
| 465 ui::GetPrimaryHoverType(prefs.available_hover_types); | 466 ui::GetPrimaryHoverType(prefs.available_hover_types); |
| 466 | 467 |
| 467 #if defined(OS_ANDROID) | 468 #if defined(OS_ANDROID) |
| 468 prefs.device_supports_mouse = false; | 469 prefs.device_supports_mouse = false; |
| 469 | 470 |
| (...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 } else { | 1088 } else { |
| 1088 render_view_ready_on_process_launch_ = true; | 1089 render_view_ready_on_process_launch_ = true; |
| 1089 } | 1090 } |
| 1090 } | 1091 } |
| 1091 | 1092 |
| 1092 void RenderViewHostImpl::RenderViewReady() { | 1093 void RenderViewHostImpl::RenderViewReady() { |
| 1093 delegate_->RenderViewReady(this); | 1094 delegate_->RenderViewReady(this); |
| 1094 } | 1095 } |
| 1095 | 1096 |
| 1096 } // namespace content | 1097 } // namespace content |
| OLD | NEW |