Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2547373002: Rename TouchEventAPI to TouchEventFeatureDetection (Closed)
Patch Set: Added a todo Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 switches::kDisableGestureRequirementForMediaPlayback); 438 switches::kDisableGestureRequirementForMediaPlayback);
439 439
440 prefs.progress_bar_completion = GetProgressBarCompletionPolicy(); 440 prefs.progress_bar_completion = GetProgressBarCompletionPolicy();
441 441
442 prefs.use_solid_color_scrollbars = true; 442 prefs.use_solid_color_scrollbars = true;
443 #endif 443 #endif
444 444
445 prefs.device_supports_touch = ui::GetTouchScreensAvailability() == 445 prefs.device_supports_touch = ui::GetTouchScreensAvailability() ==
446 ui::TouchScreensAvailability::ENABLED; 446 ui::TouchScreensAvailability::ENABLED;
447 const std::string touch_enabled_switch = 447 const std::string touch_enabled_switch =
448 command_line.HasSwitch(switches::kTouchEvents) 448 command_line.HasSwitch(switches::kTouchEventFeatureDetection)
449 ? command_line.GetSwitchValueASCII(switches::kTouchEvents) 449 ? command_line.GetSwitchValueASCII(
450 : switches::kTouchEventsAuto; 450 switches::kTouchEventFeatureDetection)
451 prefs.touch_event_api_enabled = 451 : switches::kTouchEventFeatureDetectionAuto;
452 (touch_enabled_switch == switches::kTouchEventsAuto) 452 prefs.touch_event_feature_detection_enabled =
453 (touch_enabled_switch == switches::kTouchEventFeatureDetectionAuto)
453 ? prefs.device_supports_touch 454 ? prefs.device_supports_touch
454 : (touch_enabled_switch.empty() || 455 : (touch_enabled_switch.empty() ||
455 touch_enabled_switch == switches::kTouchEventsEnabled); 456 touch_enabled_switch ==
457 switches::kTouchEventFeatureDetectionEnabled);
456 std::tie(prefs.available_pointer_types, prefs.available_hover_types) = 458 std::tie(prefs.available_pointer_types, prefs.available_hover_types) =
457 ui::GetAvailablePointerAndHoverTypes(); 459 ui::GetAvailablePointerAndHoverTypes();
458 prefs.primary_pointer_type = 460 prefs.primary_pointer_type =
459 ui::GetPrimaryPointerType(prefs.available_pointer_types); 461 ui::GetPrimaryPointerType(prefs.available_pointer_types);
460 prefs.primary_hover_type = 462 prefs.primary_hover_type =
461 ui::GetPrimaryHoverType(prefs.available_hover_types); 463 ui::GetPrimaryHoverType(prefs.available_hover_types);
462 464
463 #if defined(OS_ANDROID) 465 #if defined(OS_ANDROID)
464 prefs.device_supports_mouse = false; 466 prefs.device_supports_mouse = false;
465 #endif 467 #endif
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 } else { 1082 } else {
1081 render_view_ready_on_process_launch_ = true; 1083 render_view_ready_on_process_launch_ = true;
1082 } 1084 }
1083 } 1085 }
1084 1086
1085 void RenderViewHostImpl::RenderViewReady() { 1087 void RenderViewHostImpl::RenderViewReady() {
1086 delegate_->RenderViewReady(this); 1088 delegate_->RenderViewReady(this);
1087 } 1089 }
1088 1090
1089 } // namespace content 1091 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698