| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 #endif | 446 #endif |
| 447 | 447 |
| 448 // Handle autoplay gesture override experiment. | 448 // Handle autoplay gesture override experiment. |
| 449 // Note that anything but a well-formed string turns the experiment off. | 449 // Note that anything but a well-formed string turns the experiment off. |
| 450 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( | 450 prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName( |
| 451 "MediaElementGestureOverrideExperiment"); | 451 "MediaElementGestureOverrideExperiment"); |
| 452 | 452 |
| 453 prefs.touch_event_api_enabled = | |
| 454 !command_line.HasSwitch(switches::kTouchEvents) || | |
| 455 command_line.GetSwitchValueASCII(switches::kTouchEvents) != | |
| 456 switches::kTouchEventsDisabled; | |
| 457 prefs.device_supports_touch = ui::GetTouchScreensAvailability() == | 453 prefs.device_supports_touch = ui::GetTouchScreensAvailability() == |
| 458 ui::TouchScreensAvailability::ENABLED; | 454 ui::TouchScreensAvailability::ENABLED; |
| 455 const std::string touch_enabled_switch = |
| 456 command_line.HasSwitch(switches::kTouchEvents) |
| 457 ? command_line.GetSwitchValueASCII(switches::kTouchEvents) |
| 458 : switches::kTouchEventsAuto; |
| 459 prefs.touch_event_api_enabled = |
| 460 (touch_enabled_switch == switches::kTouchEventsAuto) |
| 461 ? prefs.device_supports_touch |
| 462 : (touch_enabled_switch.empty() || |
| 463 touch_enabled_switch == switches::kTouchEventsEnabled); |
| 459 std::tie(prefs.available_pointer_types, prefs.available_hover_types) = | 464 std::tie(prefs.available_pointer_types, prefs.available_hover_types) = |
| 460 ui::GetAvailablePointerAndHoverTypes(); | 465 ui::GetAvailablePointerAndHoverTypes(); |
| 461 prefs.primary_pointer_type = | 466 prefs.primary_pointer_type = |
| 462 ui::GetPrimaryPointerType(prefs.available_pointer_types); | 467 ui::GetPrimaryPointerType(prefs.available_pointer_types); |
| 463 prefs.primary_hover_type = | 468 prefs.primary_hover_type = |
| 464 ui::GetPrimaryHoverType(prefs.available_hover_types); | 469 ui::GetPrimaryHoverType(prefs.available_hover_types); |
| 465 | 470 |
| 466 #if defined(OS_ANDROID) | 471 #if defined(OS_ANDROID) |
| 467 prefs.device_supports_mouse = false; | 472 prefs.device_supports_mouse = false; |
| 468 #endif | 473 #endif |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 } else { | 1084 } else { |
| 1080 render_view_ready_on_process_launch_ = true; | 1085 render_view_ready_on_process_launch_ = true; |
| 1081 } | 1086 } |
| 1082 } | 1087 } |
| 1083 | 1088 |
| 1084 void RenderViewHostImpl::RenderViewReady() { | 1089 void RenderViewHostImpl::RenderViewReady() { |
| 1085 delegate_->RenderViewReady(this); | 1090 delegate_->RenderViewReady(this); |
| 1086 } | 1091 } |
| 1087 | 1092 |
| 1088 } // namespace content | 1093 } // namespace content |
| OLD | NEW |