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

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

Issue 2531413002: Reset the default value of touch event flag back to "Auto". (Closed)
Patch Set: 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 prefs.touch_event_api_enabled =
456 (!command_line.HasSwitch(switches::kTouchEvents) ||
457 command_line.GetSwitchValueASCII(switches::kTouchEvents) ==
458 switches::kTouchEventsAuto)
459 ? prefs.device_supports_touch
460 : (command_line.GetSwitchValueASCII(switches::kTouchEvents) ==
461 switches::kTouchEventsEnabled);
459 std::tie(prefs.available_pointer_types, prefs.available_hover_types) = 462 std::tie(prefs.available_pointer_types, prefs.available_hover_types) =
460 ui::GetAvailablePointerAndHoverTypes(); 463 ui::GetAvailablePointerAndHoverTypes();
461 prefs.primary_pointer_type = 464 prefs.primary_pointer_type =
462 ui::GetPrimaryPointerType(prefs.available_pointer_types); 465 ui::GetPrimaryPointerType(prefs.available_pointer_types);
463 prefs.primary_hover_type = 466 prefs.primary_hover_type =
464 ui::GetPrimaryHoverType(prefs.available_hover_types); 467 ui::GetPrimaryHoverType(prefs.available_hover_types);
465 468
466 #if defined(OS_ANDROID) 469 #if defined(OS_ANDROID)
467 prefs.device_supports_mouse = false; 470 prefs.device_supports_mouse = false;
468 #endif 471 #endif
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1079 } else { 1082 } else {
1080 render_view_ready_on_process_launch_ = true; 1083 render_view_ready_on_process_launch_ = true;
1081 } 1084 }
1082 } 1085 }
1083 1086
1084 void RenderViewHostImpl::RenderViewReady() { 1087 void RenderViewHostImpl::RenderViewReady() {
1085 delegate_->RenderViewReady(this); 1088 delegate_->RenderViewReady(this);
1086 } 1089 }
1087 1090
1088 } // namespace content 1091 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698