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

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

Issue 1966983003: Generate param traits size methods for IPC files in content/ (and traits it depends on). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix owners Created 4 years, 7 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 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/scoped_web_input_event.h" 13 #include "content/common/input/scoped_web_input_event.h"
14 #include "content/common/input/synthetic_gesture_packet.h" 14 #include "content/common/input/synthetic_gesture_packet.h"
15 15
16 namespace IPC { 16 namespace IPC {
17 17
18 template <> 18 template <>
19 struct CONTENT_EXPORT ParamTraits<content::ScopedWebInputEvent> { 19 struct CONTENT_EXPORT ParamTraits<content::ScopedWebInputEvent> {
20 typedef content::ScopedWebInputEvent param_type; 20 typedef content::ScopedWebInputEvent param_type;
21 static void GetSize(base::PickleSizer* s, const param_type& p);
21 static void Write(base::Pickle* m, const param_type& p); 22 static void Write(base::Pickle* m, const param_type& p);
22 static bool Read(const base::Pickle* m, 23 static bool Read(const base::Pickle* m,
23 base::PickleIterator* iter, 24 base::PickleIterator* iter,
24 param_type* r); 25 param_type* r);
25 static void Log(const param_type& p, std::string* l); 26 static void Log(const param_type& p, std::string* l);
26 }; 27 };
27 28
28 template<> 29 template<>
29 struct CONTENT_EXPORT ParamTraits<content::SyntheticGesturePacket> { 30 struct CONTENT_EXPORT ParamTraits<content::SyntheticGesturePacket> {
30 typedef content::SyntheticGesturePacket param_type; 31 typedef content::SyntheticGesturePacket param_type;
31 static void Write(base::Pickle* m, const param_type& p); 32 static void Write(base::Pickle* m, const param_type& p);
32 static bool Read(const base::Pickle* m, 33 static bool Read(const base::Pickle* m,
33 base::PickleIterator* iter, 34 base::PickleIterator* iter,
34 param_type* r); 35 param_type* r);
35 static void Log(const param_type& p, std::string* l); 36 static void Log(const param_type& p, std::string* l);
36 }; 37 };
37 38
38 } // namespace IPC 39 } // namespace IPC
39 40
40 #endif // CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_ 41 #endif // CONTENT_COMMON_INPUT_INPUT_PARAM_TRAITS_H_
OLDNEW
« no previous file with comments | « content/common/indexed_db/indexed_db_param_traits.cc ('k') | content/common/input/input_param_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698