| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GFX_IPC_GFX_PARAM_TRAITS_H_ | 5 #ifndef UI_GFX_IPC_GFX_PARAM_TRAITS_H_ |
| 6 #define UI_GFX_IPC_GFX_PARAM_TRAITS_H_ | 6 #define UI_GFX_IPC_GFX_PARAM_TRAITS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "ipc/ipc_message_utils.h" | 10 #include "ipc/ipc_message_utils.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 static void Write(base::Pickle* m, const param_type& p); | 41 static void Write(base::Pickle* m, const param_type& p); |
| 42 static bool Read(const base::Pickle* m, | 42 static bool Read(const base::Pickle* m, |
| 43 base::PickleIterator* iter, | 43 base::PickleIterator* iter, |
| 44 param_type* r); | 44 param_type* r); |
| 45 static void Log(const param_type& p, std::string* l); | 45 static void Log(const param_type& p, std::string* l); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 template <> | 48 template <> |
| 49 struct GFX_IPC_EXPORT ParamTraits<gfx::PointF> { | 49 struct GFX_IPC_EXPORT ParamTraits<gfx::PointF> { |
| 50 typedef gfx::PointF param_type; | 50 typedef gfx::PointF param_type; |
| 51 static void GetSize(base::PickleSizer* s, const param_type& p); | |
| 52 static void Write(base::Pickle* m, const param_type& p); | 51 static void Write(base::Pickle* m, const param_type& p); |
| 53 static bool Read(const base::Pickle* m, | 52 static bool Read(const base::Pickle* m, |
| 54 base::PickleIterator* iter, | 53 base::PickleIterator* iter, |
| 55 param_type* r); | 54 param_type* r); |
| 56 static void Log(const param_type& p, std::string* l); | 55 static void Log(const param_type& p, std::string* l); |
| 57 }; | 56 }; |
| 58 | 57 |
| 59 template <> | 58 template <> |
| 60 struct GFX_IPC_EXPORT ParamTraits<gfx::Point3F> { | 59 struct GFX_IPC_EXPORT ParamTraits<gfx::Point3F> { |
| 61 typedef gfx::Point3F param_type; | 60 typedef gfx::Point3F param_type; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 82 static void Write(base::Pickle* m, const param_type& p); | 81 static void Write(base::Pickle* m, const param_type& p); |
| 83 static bool Read(const base::Pickle* m, | 82 static bool Read(const base::Pickle* m, |
| 84 base::PickleIterator* iter, | 83 base::PickleIterator* iter, |
| 85 param_type* r); | 84 param_type* r); |
| 86 static void Log(const param_type& p, std::string* l); | 85 static void Log(const param_type& p, std::string* l); |
| 87 }; | 86 }; |
| 88 | 87 |
| 89 template <> | 88 template <> |
| 90 struct GFX_IPC_EXPORT ParamTraits<gfx::Vector2d> { | 89 struct GFX_IPC_EXPORT ParamTraits<gfx::Vector2d> { |
| 91 typedef gfx::Vector2d param_type; | 90 typedef gfx::Vector2d param_type; |
| 92 static void GetSize(base::PickleSizer* s, const param_type& p); | |
| 93 static void Write(base::Pickle* m, const param_type& p); | 91 static void Write(base::Pickle* m, const param_type& p); |
| 94 static bool Read(const base::Pickle* m, | 92 static bool Read(const base::Pickle* m, |
| 95 base::PickleIterator* iter, | 93 base::PickleIterator* iter, |
| 96 param_type* r); | 94 param_type* r); |
| 97 static void Log(const param_type& p, std::string* l); | 95 static void Log(const param_type& p, std::string* l); |
| 98 }; | 96 }; |
| 99 | 97 |
| 100 template <> | 98 template <> |
| 101 struct GFX_IPC_EXPORT ParamTraits<gfx::Vector2dF> { | 99 struct GFX_IPC_EXPORT ParamTraits<gfx::Vector2dF> { |
| 102 typedef gfx::Vector2dF param_type; | 100 typedef gfx::Vector2dF param_type; |
| (...skipping 10 matching lines...) Expand all Loading... |
| 113 static void Write(base::Pickle* m, const param_type& p); | 111 static void Write(base::Pickle* m, const param_type& p); |
| 114 static bool Read(const base::Pickle* m, | 112 static bool Read(const base::Pickle* m, |
| 115 base::PickleIterator* iter, | 113 base::PickleIterator* iter, |
| 116 param_type* r); | 114 param_type* r); |
| 117 static void Log(const param_type& p, std::string* l); | 115 static void Log(const param_type& p, std::string* l); |
| 118 }; | 116 }; |
| 119 | 117 |
| 120 template <> | 118 template <> |
| 121 struct GFX_IPC_EXPORT ParamTraits<gfx::RectF> { | 119 struct GFX_IPC_EXPORT ParamTraits<gfx::RectF> { |
| 122 typedef gfx::RectF param_type; | 120 typedef gfx::RectF param_type; |
| 123 static void GetSize(base::PickleSizer* s, const param_type& p); | |
| 124 static void Write(base::Pickle* m, const param_type& p); | 121 static void Write(base::Pickle* m, const param_type& p); |
| 125 static bool Read(const base::Pickle* m, | 122 static bool Read(const base::Pickle* m, |
| 126 base::PickleIterator* iter, | 123 base::PickleIterator* iter, |
| 127 param_type* r); | 124 param_type* r); |
| 128 static void Log(const param_type& p, std::string* l); | 125 static void Log(const param_type& p, std::string* l); |
| 129 }; | 126 }; |
| 130 | 127 |
| 131 template <> | 128 template <> |
| 132 struct GFX_IPC_EXPORT ParamTraits<SkBitmap> { | 129 struct GFX_IPC_EXPORT ParamTraits<SkBitmap> { |
| 133 typedef SkBitmap param_type; | 130 typedef SkBitmap param_type; |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 static bool Read(const base::Pickle* m, | 171 static bool Read(const base::Pickle* m, |
| 175 base::PickleIterator* iter, | 172 base::PickleIterator* iter, |
| 176 param_type* r); | 173 param_type* r); |
| 177 static void Log(const param_type& p, std::string* l); | 174 static void Log(const param_type& p, std::string* l); |
| 178 }; | 175 }; |
| 179 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 176 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 180 | 177 |
| 181 } // namespace IPC | 178 } // namespace IPC |
| 182 | 179 |
| 183 #endif // UI_GFX_IPC_GFX_PARAM_TRAITS_H_ | 180 #endif // UI_GFX_IPC_GFX_PARAM_TRAITS_H_ |
| OLD | NEW |