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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 375863005: Touch emulator: allow multiple touch streams. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better touch sequence end check Created 6 years, 5 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 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <list> 9 #include <list>
10 #include <map> 10 #include <map>
(...skipping 12 matching lines...) Expand all
23 #include "base/time/time.h" 23 #include "base/time/time.h"
24 #include "base/timer/timer.h" 24 #include "base/timer/timer.h"
25 #include "build/build_config.h" 25 #include "build/build_config.h"
26 #include "cc/resources/shared_bitmap.h" 26 #include "cc/resources/shared_bitmap.h"
27 #include "content/browser/accessibility/browser_accessibility_manager.h" 27 #include "content/browser/accessibility/browser_accessibility_manager.h"
28 #include "content/browser/renderer_host/event_with_latency_info.h" 28 #include "content/browser/renderer_host/event_with_latency_info.h"
29 #include "content/browser/renderer_host/input/input_ack_handler.h" 29 #include "content/browser/renderer_host/input/input_ack_handler.h"
30 #include "content/browser/renderer_host/input/input_router_client.h" 30 #include "content/browser/renderer_host/input/input_router_client.h"
31 #include "content/browser/renderer_host/input/synthetic_gesture.h" 31 #include "content/browser/renderer_host/input/synthetic_gesture.h"
32 #include "content/browser/renderer_host/input/touch_emulator_client.h" 32 #include "content/browser/renderer_host/input/touch_emulator_client.h"
33 #include "content/browser/renderer_host/input/touch_stream_tracker.h"
33 #include "content/common/input/input_event_ack_state.h" 34 #include "content/common/input/input_event_ack_state.h"
34 #include "content/common/input/synthetic_gesture_packet.h" 35 #include "content/common/input/synthetic_gesture_packet.h"
35 #include "content/common/view_message_enums.h" 36 #include "content/common/view_message_enums.h"
36 #include "content/public/browser/render_widget_host.h" 37 #include "content/public/browser/render_widget_host.h"
37 #include "content/public/common/page_zoom.h" 38 #include "content/public/common/page_zoom.h"
38 #include "ipc/ipc_listener.h" 39 #include "ipc/ipc_listener.h"
39 #include "ui/base/ime/text_input_mode.h" 40 #include "ui/base/ime/text_input_mode.h"
40 #include "ui/base/ime/text_input_type.h" 41 #include "ui/base/ime/text_input_type.h"
41 #include "ui/events/latency_info.h" 42 #include "ui/events/latency_info.h"
42 #include "ui/gfx/native_widget_types.h" 43 #include "ui/gfx/native_widget_types.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 void ForwardTouchEventWithLatencyInfo( 290 void ForwardTouchEventWithLatencyInfo(
290 const blink::WebTouchEvent& touch_event, 291 const blink::WebTouchEvent& touch_event,
291 const ui::LatencyInfo& ui_latency); 292 const ui::LatencyInfo& ui_latency);
292 void ForwardMouseEventWithLatencyInfo( 293 void ForwardMouseEventWithLatencyInfo(
293 const blink::WebMouseEvent& mouse_event, 294 const blink::WebMouseEvent& mouse_event,
294 const ui::LatencyInfo& ui_latency); 295 const ui::LatencyInfo& ui_latency);
295 void ForwardWheelEventWithLatencyInfo( 296 void ForwardWheelEventWithLatencyInfo(
296 const blink::WebMouseWheelEvent& wheel_event, 297 const blink::WebMouseWheelEvent& wheel_event,
297 const ui::LatencyInfo& ui_latency); 298 const ui::LatencyInfo& ui_latency);
298 299
299 // TouchEmulatorClient overrides. 300 // TouchEmulatorClient implementation.
300 virtual void ForwardGestureEvent( 301 virtual void ForwardGestureEvent(
301 const blink::WebGestureEvent& gesture_event) OVERRIDE; 302 const blink::WebGestureEvent& gesture_event) OVERRIDE;
302 virtual void ForwardTouchEvent( 303 virtual void ForwardEmulatedTouchEvent(
303 const blink::WebTouchEvent& touch_event) OVERRIDE; 304 const blink::WebTouchEvent& touch_event) OVERRIDE;
304 virtual void SetCursor(const WebCursor& cursor) OVERRIDE; 305 virtual void SetCursor(const WebCursor& cursor) OVERRIDE;
305 306
306 // Queues a synthetic gesture for testing purposes. Invokes the on_complete 307 // Queues a synthetic gesture for testing purposes. Invokes the on_complete
307 // callback when the gesture is finished running. 308 // callback when the gesture is finished running.
308 void QueueSyntheticGesture( 309 void QueueSyntheticGesture(
309 scoped_ptr<SyntheticGesture> synthetic_gesture, 310 scoped_ptr<SyntheticGesture> synthetic_gesture,
310 const base::Callback<void(SyntheticGesture::Result)>& on_complete); 311 const base::Callback<void(SyntheticGesture::Result)>& on_complete);
311 312
312 void CancelUpdateTextDirection(); 313 void CancelUpdateTextDirection();
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 virtual void OnWheelEventAck(const MouseWheelEventWithLatencyInfo& event, 690 virtual void OnWheelEventAck(const MouseWheelEventWithLatencyInfo& event,
690 InputEventAckState ack_result) OVERRIDE; 691 InputEventAckState ack_result) OVERRIDE;
691 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event, 692 virtual void OnTouchEventAck(const TouchEventWithLatencyInfo& event,
692 InputEventAckState ack_result) OVERRIDE; 693 InputEventAckState ack_result) OVERRIDE;
693 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event, 694 virtual void OnGestureEventAck(const GestureEventWithLatencyInfo& event,
694 InputEventAckState ack_result) OVERRIDE; 695 InputEventAckState ack_result) OVERRIDE;
695 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE; 696 virtual void OnUnexpectedEventAck(UnexpectedEventAckType type) OVERRIDE;
696 697
697 void OnSyntheticGestureCompleted(SyntheticGesture::Result result); 698 void OnSyntheticGestureCompleted(SyntheticGesture::Result result);
698 699
700 void ForwardTouchEventWithLatencyInfoFromStream(
701 const blink::WebTouchEvent& touch_event,
702 const ui::LatencyInfo& ui_latency,
703 TouchStreamTracker::TouchStream stream);
704 void OnTouchEventAckFromStream(
705 const TouchEventWithLatencyInfo& event,
706 InputEventAckState ack_result,
707 TouchStreamTracker::TouchStream stream);
708
699 // Called when there is a new auto resize (using a post to avoid a stack 709 // Called when there is a new auto resize (using a post to avoid a stack
700 // which may get in recursive loops). 710 // which may get in recursive loops).
701 void DelayedAutoResized(); 711 void DelayedAutoResized();
702 712
703 void WindowOldSnapshotReachedScreen(int snapshot_id); 713 void WindowOldSnapshotReachedScreen(int snapshot_id);
704 714
705 void WindowSnapshotReachedScreen(int snapshot_id); 715 void WindowSnapshotReachedScreen(int snapshot_id);
706 716
707 void OnSnapshotDataReceived(int snapshot_id, 717 void OnSnapshotDataReceived(int snapshot_id,
708 const unsigned char* png, 718 const unsigned char* png,
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 // then touch events are sent to the renderer. Otherwise, the touch events are 871 // then touch events are sent to the renderer. Otherwise, the touch events are
862 // not sent to the renderer. 872 // not sent to the renderer.
863 bool has_touch_handler_; 873 bool has_touch_handler_;
864 874
865 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 875 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
866 876
867 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_; 877 scoped_ptr<SyntheticGestureController> synthetic_gesture_controller_;
868 878
869 scoped_ptr<TouchEmulator> touch_emulator_; 879 scoped_ptr<TouchEmulator> touch_emulator_;
870 880
881 scoped_ptr<TouchStreamTracker> touch_stream_tracker_;
882
871 // Receives and handles all input events. 883 // Receives and handles all input events.
872 scoped_ptr<InputRouter> input_router_; 884 scoped_ptr<InputRouter> input_router_;
873 885
874 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_; 886 scoped_ptr<TimeoutMonitor> hang_monitor_timeout_;
875 887
876 #if defined(OS_WIN) 888 #if defined(OS_WIN)
877 std::list<HWND> dummy_windows_for_activation_; 889 std::list<HWND> dummy_windows_for_activation_;
878 #endif 890 #endif
879 891
880 int64 last_input_number_; 892 int64 last_input_number_;
881 893
882 int next_browser_snapshot_id_; 894 int next_browser_snapshot_id_;
883 typedef std::map<int, 895 typedef std::map<int,
884 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; 896 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap;
885 PendingSnapshotMap pending_browser_snapshots_; 897 PendingSnapshotMap pending_browser_snapshots_;
886 898
887 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 899 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
888 }; 900 };
889 901
890 } // namespace content 902 } // namespace content
891 903
892 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 904 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698