| 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" |
| 11 #include "ipc/param_traits_macros.h" | 11 #include "ipc/param_traits_macros.h" |
| 12 #include "ui/gfx/buffer_types.h" | 12 #include "ui/gfx/buffer_types.h" |
| 13 #include "ui/gfx/ipc/gfx_ipc_export.h" | 13 #include "ui/gfx/ipc/gfx_ipc_export.h" |
| 14 #include "ui/gfx/ipc/gfx_param_traits_macros.h" | 14 #include "ui/gfx/ipc/gfx_param_traits_macros.h" |
| 15 | 15 |
| 16 class SkBitmap; | 16 class SkBitmap; |
| 17 | 17 |
| 18 namespace gfx { | 18 namespace gfx { |
| 19 class Point; | 19 class Point; |
| 20 class PointF; | 20 class PointF; |
| 21 class Point3F; | 21 class Point3F; |
| 22 class Range; | 22 class Range; |
| 23 class Rect; | 23 class Rect; |
| 24 class RectF; | 24 class RectF; |
| 25 class ScrollOffset; |
| 25 class Size; | 26 class Size; |
| 26 class SizeF; | 27 class SizeF; |
| 27 class Vector2d; | 28 class Vector2d; |
| 28 class Vector2dF; | 29 class Vector2dF; |
| 29 } // namespace gfx | 30 } // namespace gfx |
| 30 | 31 |
| 31 namespace IPC { | 32 namespace IPC { |
| 32 | 33 |
| 33 template <> | 34 template <> |
| 34 struct GFX_IPC_EXPORT ParamTraits<gfx::Point> { | 35 struct GFX_IPC_EXPORT ParamTraits<gfx::Point> { |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 }; | 116 }; |
| 116 | 117 |
| 117 template <> | 118 template <> |
| 118 struct GFX_IPC_EXPORT ParamTraits<gfx::Range> { | 119 struct GFX_IPC_EXPORT ParamTraits<gfx::Range> { |
| 119 typedef gfx::Range param_type; | 120 typedef gfx::Range param_type; |
| 120 static void Write(Message* m, const param_type& p); | 121 static void Write(Message* m, const param_type& p); |
| 121 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); | 122 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
| 122 static void Log(const param_type& p, std::string* l); | 123 static void Log(const param_type& p, std::string* l); |
| 123 }; | 124 }; |
| 124 | 125 |
| 126 template <> |
| 127 struct GFX_IPC_EXPORT ParamTraits<gfx::ScrollOffset> { |
| 128 typedef gfx::ScrollOffset param_type; |
| 129 static void Write(Message* m, const param_type& p); |
| 130 static bool Read(const Message* m, base::PickleIterator* iter, param_type* r); |
| 131 static void Log(const param_type& p, std::string* l); |
| 132 }; |
| 133 |
| 125 } // namespace IPC | 134 } // namespace IPC |
| 126 | 135 |
| 127 #endif // UI_GFX_IPC_GFX_PARAM_TRAITS_H_ | 136 #endif // UI_GFX_IPC_GFX_PARAM_TRAITS_H_ |
| OLD | NEW |