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

Unified Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 2467913002: Touch event flag should control only DOM event firing. (Closed)
Patch Set: Deprecate the histogram. Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index e19736a7ecbf312614899a577d0d931039449b59..e46921b3818fd381314236b3b1e6b2e32ac6dd38 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -85,8 +85,8 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/base/touch/touch_device.h"
-#include "ui/base/touch/touch_enabled.h"
#include "ui/base/ui_base_switches.h"
+#include "ui/events/event_switches.h"
#include "ui/gfx/animation/animation.h"
#include "ui/gfx/color_space.h"
#include "ui/gfx/image/image_skia.h"
@@ -449,10 +449,12 @@ WebPreferences RenderViewHostImpl::ComputeWebkitPrefs() {
prefs.autoplay_experiment_mode = base::FieldTrialList::FindFullName(
"MediaElementGestureOverrideExperiment");
- prefs.touch_enabled = ui::AreTouchEventsEnabled();
- prefs.device_supports_touch = prefs.touch_enabled &&
- ui::GetTouchScreensAvailability() ==
- ui::TouchScreensAvailability::ENABLED;
+ prefs.touch_event_api_enabled =
+ !command_line.HasSwitch(switches::kTouchEvents) ||
+ command_line.GetSwitchValueASCII(switches::kTouchEvents) !=
+ switches::kTouchEventsDisabled;
+ prefs.device_supports_touch = ui::GetTouchScreensAvailability() ==
+ ui::TouchScreensAvailability::ENABLED;
std::tie(prefs.available_pointer_types, prefs.available_hover_types) =
ui::GetAvailablePointerAndHoverTypes();
prefs.primary_pointer_type =

Powered by Google App Engine
This is Rietveld 408576698