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

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

Issue 2742333002: Remove ScopedVector from content/browser/ [1]. (Closed)
Patch Set: Created 3 years, 9 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 "base/memory/scoped_vector.h" 8 #include <memory>
9 #include <vector>
10
9 #include "content/browser/renderer_host/event_with_latency_info.h" 11 #include "content/browser/renderer_host/event_with_latency_info.h"
10 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
11 13
12 namespace ui { 14 namespace ui {
13 class TouchEvent; 15 class TouchEvent;
14 } 16 }
15 17
16 namespace content { 18 namespace content {
17 19
18 enum TouchEventCoordinateSystem { 20 enum TouchEventCoordinateSystem {
19 SCREEN_COORDINATES, 21 SCREEN_COORDINATES,
20 LOCAL_COORDINATES 22 LOCAL_COORDINATES
21 }; 23 };
22 24
23 // Creates a list of ui::TouchEvents out of a single WebTouchEvent. 25 // Creates a list of ui::TouchEvents out of a single WebTouchEvent.
24 // A WebTouchEvent can contain information about a number of WebTouchPoints, 26 // A WebTouchEvent can contain information about a number of WebTouchPoints,
25 // 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
26 // 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
27 // 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
28 // LatencyInfo the WebTouchEvent carries. 30 // LatencyInfo the WebTouchEvent carries.
29 // |coordinate_system| specifies which fields to use for the co-ordinates, 31 // |coordinate_system| specifies which fields to use for the co-ordinates,
30 // WebTouchPoint.position or WebTouchPoint.screenPosition. Is's up to the 32 // WebTouchPoint.position or WebTouchPoint.screenPosition. Is's up to the
31 // 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
32 // the Aura EventDispatcher co-ordinate system). 34 // the Aura EventDispatcher co-ordinate system).
33 CONTENT_EXPORT bool MakeUITouchEventsFromWebTouchEvents( 35 CONTENT_EXPORT bool MakeUITouchEventsFromWebTouchEvents(
34 const TouchEventWithLatencyInfo& touch, 36 const TouchEventWithLatencyInfo& touch,
35 ScopedVector<ui::TouchEvent>* list, 37 std::vector<std::unique_ptr<ui::TouchEvent>>* list,
36 TouchEventCoordinateSystem coordinate_system); 38 TouchEventCoordinateSystem coordinate_system);
37 39
38 } // namespace content 40 } // namespace content
39 41
40 #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