| 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 #include "ui/gfx/selection_bound.h" |
| 15 | 16 |
| 16 #if defined(OS_MACOSX) && !defined(OS_IOS) | 17 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 17 #include "ui/gfx/mac/io_surface.h" | 18 #include "ui/gfx/mac/io_surface.h" |
| 18 #endif | 19 #endif |
| 19 | 20 |
| 20 namespace gfx { | 21 namespace gfx { |
| 21 class Range; | 22 class Range; |
| 22 } | 23 } |
| 23 | 24 |
| 24 namespace IPC { | 25 namespace IPC { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 44 // to the ScopedRefCountedIOSurfaceMachPort. Therefore, Read() may only be | 45 // to the ScopedRefCountedIOSurfaceMachPort. Therefore, Read() may only be |
| 45 // called once for a given message, otherwise the singular right will be | 46 // called once for a given message, otherwise the singular right will be |
| 46 // managed and released by two objects. | 47 // managed and released by two objects. |
| 47 static bool Read(const base::Pickle* m, | 48 static bool Read(const base::Pickle* m, |
| 48 base::PickleIterator* iter, | 49 base::PickleIterator* iter, |
| 49 param_type* r); | 50 param_type* r); |
| 50 static void Log(const param_type& p, std::string* l); | 51 static void Log(const param_type& p, std::string* l); |
| 51 }; | 52 }; |
| 52 #endif // defined(OS_MACOSX) && !defined(OS_IOS) | 53 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 53 | 54 |
| 55 template <> |
| 56 struct GFX_IPC_EXPORT ParamTraits<gfx::SelectionBound> { |
| 57 typedef gfx::SelectionBound param_type; |
| 58 static void GetSize(base::PickleSizer* s, const param_type& p); |
| 59 static void Write(base::Pickle* m, const param_type& p); |
| 60 static bool Read(const base::Pickle* m, |
| 61 base::PickleIterator* iter, |
| 62 param_type* r); |
| 63 static void Log(const param_type& p, std::string* l); |
| 64 }; |
| 65 |
| 54 } // namespace IPC | 66 } // namespace IPC |
| 55 | 67 |
| 56 #endif // UI_GFX_IPC_GFX_PARAM_TRAITS_H_ | 68 #endif // UI_GFX_IPC_GFX_PARAM_TRAITS_H_ |
| OLD | NEW |