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

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

Issue 2953563002: Revert of [VSync Queue] Plug touch ack to gesture events and flush vsync queue if necessary (Closed)
Patch Set: Created 3 years, 6 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
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_UI_EVENTS_HELPER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_UI_EVENTS_HELPER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_UI_EVENTS_HELPER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_UI_EVENTS_HELPER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "content/browser/renderer_host/event_with_latency_info.h" 11 #include "content/browser/renderer_host/event_with_latency_info.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "content/common/input/input_event_ack_state.h"
14 13
15 namespace ui { 14 namespace ui {
16 class TouchEvent; 15 class TouchEvent;
17 } 16 }
18 17
19 namespace content { 18 namespace content {
20 19
21 enum TouchEventCoordinateSystem { 20 enum TouchEventCoordinateSystem {
22 SCREEN_COORDINATES, 21 SCREEN_COORDINATES,
23 LOCAL_COORDINATES 22 LOCAL_COORDINATES
24 }; 23 };
25 24
26 // Creates a list of ui::TouchEvents out of a single WebTouchEvent. 25 // Creates a list of ui::TouchEvents out of a single WebTouchEvent.
27 // A WebTouchEvent can contain information about a number of WebTouchPoints, 26 // A WebTouchEvent can contain information about a number of WebTouchPoints,
28 // whereas a ui::TouchEvent contains information about a single touch-point. So 27 // whereas a ui::TouchEvent contains information about a single touch-point. So
29 // it is possible to create more than one ui::TouchEvents out of a single 28 // it is possible to create more than one ui::TouchEvents out of a single
30 // WebTouchEvent. All the ui::TouchEvent in the list will carry the same 29 // WebTouchEvent. All the ui::TouchEvent in the list will carry the same
31 // LatencyInfo the WebTouchEvent carries. 30 // LatencyInfo the WebTouchEvent carries.
32 // |coordinate_system| specifies which fields to use for the co-ordinates, 31 // |coordinate_system| specifies which fields to use for the co-ordinates,
33 // WebTouchPoint.position or WebTouchPoint.screenPosition. Is's up to the 32 // WebTouchPoint.position or WebTouchPoint.screenPosition. Is's up to the
34 // caller to do any co-ordinate system mapping (typically to get them into 33 // caller to do any co-ordinate system mapping (typically to get them into
35 // the Aura EventDispatcher co-ordinate system). 34 // the Aura EventDispatcher co-ordinate system).
36 CONTENT_EXPORT bool MakeUITouchEventsFromWebTouchEvents( 35 CONTENT_EXPORT bool MakeUITouchEventsFromWebTouchEvents(
37 const TouchEventWithLatencyInfo& touch, 36 const TouchEventWithLatencyInfo& touch,
38 std::vector<std::unique_ptr<ui::TouchEvent>>* list, 37 std::vector<std::unique_ptr<ui::TouchEvent>>* list,
39 TouchEventCoordinateSystem coordinate_system); 38 TouchEventCoordinateSystem coordinate_system);
40 39
41 // Utility to map the event ack state from the renderer, returns true if the
42 // event could be handled non-blocking.
43 bool InputEventAckStateIsSetNonBlocking(InputEventAckState);
44
45 } // namespace content 40 } // namespace content
46 41
47 #endif // CONTENT_BROWSER_RENDERER_HOST_UI_EVENTS_HELPER_H_ 42 #endif // CONTENT_BROWSER_RENDERER_HOST_UI_EVENTS_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698