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

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

Issue 250923004: Synthesize ctrl-wheel events on touchpad pinch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows build and tweaks Created 6 years, 7 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 | Annotate | Revision Log
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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 735
736 void SimulateGestureScrollUpdateEvent(float dX, float dY, int modifiers) { 736 void SimulateGestureScrollUpdateEvent(float dX, float dY, int modifiers) {
737 SimulateGestureEventCore( 737 SimulateGestureEventCore(
738 SyntheticWebGestureEventBuilder::BuildScrollUpdate(dX, dY, modifiers)); 738 SyntheticWebGestureEventBuilder::BuildScrollUpdate(dX, dY, modifiers));
739 } 739 }
740 740
741 void SimulateGesturePinchUpdateEvent(float scale, 741 void SimulateGesturePinchUpdateEvent(float scale,
742 float anchorX, 742 float anchorX,
743 float anchorY, 743 float anchorY,
744 int modifiers) { 744 int modifiers) {
745 SimulateGestureEventCore( 745 SimulateGestureEventCore(SyntheticWebGestureEventBuilder::BuildPinchUpdate(
746 SyntheticWebGestureEventBuilder::BuildPinchUpdate(scale, 746 scale, anchorX, anchorY, modifiers, WebGestureEvent::Touchscreen));
747 anchorX,
748 anchorY,
749 modifiers));
750 } 747 }
751 748
752 // Inject synthetic GestureFlingStart events. 749 // Inject synthetic GestureFlingStart events.
753 void SimulateGestureFlingStartEvent( 750 void SimulateGestureFlingStartEvent(
754 float velocityX, 751 float velocityX,
755 float velocityY, 752 float velocityY,
756 WebGestureEvent::SourceDevice sourceDevice) { 753 WebGestureEvent::SourceDevice sourceDevice) {
757 SimulateGestureEventCore( 754 SimulateGestureEventCore(
758 SyntheticWebGestureEventBuilder::BuildFling(velocityX, 755 SyntheticWebGestureEventBuilder::BuildFling(velocityX,
759 velocityY, 756 velocityY,
(...skipping 1919 matching lines...) Expand 10 before | Expand all | Expand 10 after
2679 2676
2680 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). 2677 // Tests RWHI::ForwardTouchEventWithLatencyInfo().
2681 PressTouchPoint(0, 1); 2678 PressTouchPoint(0, 1);
2682 SendTouchEvent(); 2679 SendTouchEvent();
2683 CheckLatencyInfoComponentInMessage( 2680 CheckLatencyInfoComponentInMessage(
2684 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); 2681 process_, GetLatencyComponentId(), WebInputEvent::TouchStart);
2685 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); 2682 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED);
2686 } 2683 }
2687 2684
2688 } // namespace content 2685 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698