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

Side by Side Diff: ui/events/blink/web_input_event_traits.h

Issue 2683043004: Remove ui/events/blink dependency on blink_minimal. (Closed)
Patch Set: fix win debug Created 3 years, 10 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ 5 #ifndef UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_
6 #define UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ 6 #define UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_
7 7
8 #include "third_party/WebKit/public/platform/WebCoalescedInputEvent.h"
9 #include "third_party/WebKit/public/platform/WebInputEvent.h" 8 #include "third_party/WebKit/public/platform/WebInputEvent.h"
10 #include "ui/events/latency_info.h" 9 #include "ui/events/latency_info.h"
11 10
12 namespace blink { 11 namespace blink {
13 class WebGestureEvent; 12 class WebGestureEvent;
14 class WebMouseWheelEvent; 13 class WebMouseWheelEvent;
15 } 14 }
16 15
17 namespace ui { 16 namespace ui {
18 17
18 struct WebInputEventDeleter {
19 void operator()(blink::WebInputEvent*) const;
20 };
21
22 using WebScopedInputEvent =
23 std::unique_ptr<blink::WebInputEvent, WebInputEventDeleter>;
24
19 // Utility class for performing operations on and with WebInputEvents. 25 // Utility class for performing operations on and with WebInputEvents.
20 class WebInputEventTraits { 26 class WebInputEventTraits {
21 public: 27 public:
22 static std::string ToString(const blink::WebInputEvent& event); 28 static std::string ToString(const blink::WebInputEvent& event);
23 static size_t GetSize(blink::WebInputEvent::Type type); 29 static size_t GetSize(blink::WebInputEvent::Type type);
24 static blink::WebScopedInputEvent Clone(const blink::WebInputEvent& event); 30 static WebScopedInputEvent Clone(const blink::WebInputEvent& event);
25 static void Delete(blink::WebInputEvent* event);
26 static bool ShouldBlockEventStream(const blink::WebInputEvent& event); 31 static bool ShouldBlockEventStream(const blink::WebInputEvent& event);
27 32
28 static bool CanCauseScroll(const blink::WebMouseWheelEvent& event); 33 static bool CanCauseScroll(const blink::WebMouseWheelEvent& event);
29 34
30 // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0. 35 // Return uniqueTouchEventId for WebTouchEvent, otherwise return 0.
31 static uint32_t GetUniqueTouchEventId(const blink::WebInputEvent& event); 36 static uint32_t GetUniqueTouchEventId(const blink::WebInputEvent& event);
32 static LatencyInfo CreateLatencyInfoForWebGestureEvent( 37 static LatencyInfo CreateLatencyInfoForWebGestureEvent(
33 const blink::WebGestureEvent& event); 38 const blink::WebGestureEvent& event);
34 }; 39 };
35 40
36 } // namespace ui 41 } // namespace ui
37 42
38 #endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_ 43 #endif // UI_EVENTS_BLINK_WEB_INPUT_EVENT_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698