Index: content/browser/renderer_host/input/touch_emulator.h |
diff --git a/content/browser/renderer_host/input/touch_emulator.h b/content/browser/renderer_host/input/touch_emulator.h |
index b4c66b26aebc76f1167bbe1418f4f03965eb0b7d..4cb5c32b4f65b2636edd956fb41ab2fae35d34ef 100644 |
--- a/content/browser/renderer_host/input/touch_emulator.h |
+++ b/content/browser/renderer_host/input/touch_emulator.h |
@@ -25,7 +25,7 @@ class CONTENT_EXPORT TouchEmulator : public ui::GestureProviderClient { |
// Note that TouchEmulator should always listen to touch events and their acks |
// (even in disabled state) to track native stream presence. |
- bool enabled() const { return enabled_; } |
+ bool enabled() const { return !!gesture_provider_.get(); } |
jdduke (slow)
2014/12/30 16:37:19
Does just "return gesture_provider_;" work?
dgozman
2015/01/14 14:14:27
Done.
|
// Returns |true| if the event was consumed. Consumed event should not |
// propagate any further. |
@@ -71,11 +71,11 @@ class CONTENT_EXPORT TouchEmulator : public ui::GestureProviderClient { |
void HandleEmulatedTouchEvent(blink::WebTouchEvent event); |
TouchEmulatorClient* const client_; |
- ui::FilteredGestureProvider gesture_provider_; |
+ // Emulator is enabled iff gesture provider is created. |
// Disabled emulator does only process touch acks left from previous |
// emulation. It does not intercept any events. |
- bool enabled_; |
+ scoped_ptr<ui::FilteredGestureProvider> gesture_provider_; |
// While emulation is on, default cursor is touch. Pressing shift changes |
// cursor to the pinch one. |