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

Side by Side Diff: content/common/input/input_param_traits.h

Issue 2479123003: WIP Add getCoalescedEvents API using vector of WebInputEvents (Closed)
Patch Set: Creating CoalescedWebInputEvent Created 4 years, 1 month 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // This file defines IPC::ParamTraits<> specializations for several 5 // This file defines IPC::ParamTraits<> specializations for several
6 // input-related types that require manual serialiation code. 6 // input-related types that require manual serialiation code.
7 7
8 #ifndef CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ 8 #ifndef CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_
9 #define CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ 9 #define CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_
10 10
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 #include "content/common/content_param_traits_macros.h" 12 #include "content/common/content_param_traits_macros.h"
13 #include "content/common/input/synthetic_gesture_packet.h" 13 #include "content/common/input/synthetic_gesture_packet.h"
14 #include "ui/events/blink/scoped_web_input_event.h" 14 #include "third_party/WebKit/public/platform/CoalescedWebInputEvent.h"
15 15
16 namespace IPC { 16 namespace IPC {
17 17
18 template <> 18 template <>
19 struct CONTENT_EXPORT ParamTraits<ui::ScopedWebInputEvent> { 19 struct CONTENT_EXPORT
20 typedef ui::ScopedWebInputEvent param_type; 20 ParamTraits<blink::CoalescedWebInputEvent::ScopedWebInputEvent> {
21 typedef blink::CoalescedWebInputEvent::ScopedWebInputEvent param_type;
21 static void GetSize(base::PickleSizer* s, const param_type& p); 22 static void GetSize(base::PickleSizer* s, const param_type& p);
22 static void Write(base::Pickle* m, const param_type& p); 23 static void Write(base::Pickle* m, const param_type& p);
23 static bool Read(const base::Pickle* m, 24 static bool Read(const base::Pickle* m,
24 base::PickleIterator* iter, 25 base::PickleIterator* iter,
25 param_type* r); 26 param_type* r);
26 static void Log(const param_type& p, std::string* l); 27 static void Log(const param_type& p, std::string* l);
27 }; 28 };
28 29
29 template<> 30 template<>
30 struct CONTENT_EXPORT ParamTraits<content::SyntheticGesturePacket> { 31 struct CONTENT_EXPORT ParamTraits<content::SyntheticGesturePacket> {
31 typedef content::SyntheticGesturePacket param_type; 32 typedef content::SyntheticGesturePacket param_type;
32 static void Write(base::Pickle* m, const param_type& p); 33 static void Write(base::Pickle* m, const param_type& p);
33 static bool Read(const base::Pickle* m, 34 static bool Read(const base::Pickle* m,
34 base::PickleIterator* iter, 35 base::PickleIterator* iter,
35 param_type* r); 36 param_type* r);
36 static void Log(const param_type& p, std::string* l); 37 static void Log(const param_type& p, std::string* l);
37 }; 38 };
38 39
39 } // namespace IPC 40 } // namespace IPC
40 41
41 #endif // CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ 42 #endif // CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698