Chromium Code Reviews| Index: content/browser/renderer_host/input/touch_emulator.cc |
| diff --git a/content/browser/renderer_host/input/touch_emulator.cc b/content/browser/renderer_host/input/touch_emulator.cc |
| index 8592bd2031c3f9dd0a0dadde0f8ef4717f91cb96..be24b9d2c2c377acd7422788dcef575cd86a9cee 100644 |
| --- a/content/browser/renderer_host/input/touch_emulator.cc |
| +++ b/content/browser/renderer_host/input/touch_emulator.cc |
| @@ -47,6 +47,7 @@ TouchEmulator::TouchEmulator(TouchEmulatorClient* client) |
| : client_(client), |
| gesture_provider_config_type_( |
| ui::GestureProviderConfigType::CURRENT_PLATFORM), |
| + double_tap_enabled_(true), |
| emulated_stream_active_sequence_count_(0), |
| native_stream_active_sequence_count_(0) { |
| DCHECK(client_); |
| @@ -92,9 +93,7 @@ void TouchEmulator::Enable(ui::GestureProviderConfigType config_type) { |
| GetEmulatorGestureProviderConfig(config_type), this)); |
| // TODO(dgozman): Use synthetic secondary touch to support multi-touch. |
| gesture_provider_->SetMultiTouchZoomSupportEnabled(false); |
| - // TODO(dgozman): Enable double tap if requested by the renderer. |
| - // TODO(dgozman): Don't break double-tap-based pinch with shift handling. |
| - gesture_provider_->SetDoubleTapSupportForPlatformEnabled(false); |
| + gesture_provider_->SetDoubleTapSupportForPageEnabled(double_tap_enabled_); |
|
jdduke (slow)
2015/01/22 16:28:27
Hmm, is it intentional that we could support doubl
dgozman
2015/01/22 17:04:37
I thought that config does already contain SetDoub
jdduke (slow)
2015/01/22 17:09:36
Do you want to do that in this patch? Or I can qui
|
| } |
| UpdateCursor(); |
| } |
| @@ -109,6 +108,12 @@ void TouchEmulator::Disable() { |
| ResetState(); |
| } |
| +void TouchEmulator::SetDoubleTapSupportForPageEnabled(bool enabled) { |
| + double_tap_enabled_ = enabled; |
| + if (gesture_provider_) |
| + gesture_provider_->SetDoubleTapSupportForPageEnabled(enabled); |
| +} |
| + |
| gfx::SizeF TouchEmulator::InitCursorFromResource( |
| WebCursor* cursor, float scale, int resource_id) { |
| gfx::Image& cursor_image = |