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

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

Issue 2773403003: Removed device_supports_touch. (Closed)
Patch Set: Preserved old touch-flag behavior. Created 3 years, 8 months 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
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
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 #else // defined(OS_ANDROID) 446 #else // defined(OS_ANDROID)
447 prefs.cross_origin_media_playback_requires_user_gesture = 447 prefs.cross_origin_media_playback_requires_user_gesture =
448 base::FeatureList::GetInstance()->IsEnabled( 448 base::FeatureList::GetInstance()->IsEnabled(
449 features::kCrossOriginMediaPlaybackRequiresUserGesture); 449 features::kCrossOriginMediaPlaybackRequiresUserGesture);
450 #endif // defined(OS_ANDROID) 450 #endif // defined(OS_ANDROID)
451 451
452 prefs.device_supports_touch = ui::GetTouchScreensAvailability() ==
453 ui::TouchScreensAvailability::ENABLED;
454 const std::string touch_enabled_switch = 452 const std::string touch_enabled_switch =
455 command_line.HasSwitch(switches::kTouchEventFeatureDetection) 453 command_line.HasSwitch(switches::kTouchEventFeatureDetection)
456 ? command_line.GetSwitchValueASCII( 454 ? command_line.GetSwitchValueASCII(
457 switches::kTouchEventFeatureDetection) 455 switches::kTouchEventFeatureDetection)
458 : switches::kTouchEventFeatureDetectionAuto; 456 : switches::kTouchEventFeatureDetectionAuto;
459 prefs.touch_event_feature_detection_enabled = 457 prefs.touch_event_feature_detection_enabled =
460 (touch_enabled_switch == switches::kTouchEventFeatureDetectionAuto) 458 (touch_enabled_switch == switches::kTouchEventFeatureDetectionAuto)
461 ? prefs.device_supports_touch 459 ? (ui::GetTouchScreensAvailability() ==
460 ui::TouchScreensAvailability::ENABLED)
462 : (touch_enabled_switch.empty() || 461 : (touch_enabled_switch.empty() ||
463 touch_enabled_switch == 462 touch_enabled_switch ==
464 switches::kTouchEventFeatureDetectionEnabled); 463 switches::kTouchEventFeatureDetectionEnabled);
465 std::tie(prefs.available_pointer_types, prefs.available_hover_types) = 464 std::tie(prefs.available_pointer_types, prefs.available_hover_types) =
466 ui::GetAvailablePointerAndHoverTypes(); 465 ui::GetAvailablePointerAndHoverTypes();
467 prefs.primary_pointer_type = 466 prefs.primary_pointer_type =
468 ui::GetPrimaryPointerType(prefs.available_pointer_types); 467 ui::GetPrimaryPointerType(prefs.available_pointer_types);
469 prefs.primary_hover_type = 468 prefs.primary_hover_type =
470 ui::GetPrimaryHoverType(prefs.available_hover_types); 469 ui::GetPrimaryHoverType(prefs.available_hover_types);
471 470
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
961 } 960 }
962 961
963 void RenderViewHostImpl::ClosePageTimeout() { 962 void RenderViewHostImpl::ClosePageTimeout() {
964 if (delegate_->ShouldIgnoreUnresponsiveRenderer()) 963 if (delegate_->ShouldIgnoreUnresponsiveRenderer())
965 return; 964 return;
966 965
967 ClosePageIgnoringUnloadEvents(); 966 ClosePageIgnoringUnloadEvents();
968 } 967 }
969 968
970 } // namespace content 969 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/public/common/common_param_traits_macros.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698