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

Side by Side Diff: ui/gfx/ipc/skia/gfx_skia_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: 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SKIA_PARAM_TRAITS_H_ 5 #ifndef UI_GFX_IPC_GFX_SKIA_PARAM_TRAITS_H_
6 #define UI_GFX_IPC_GFX_SKIA_PARAM_TRAITS_H_ 6 #define UI_GFX_IPC_GFX_SKIA_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/ipc_param_traits.h" 11 #include "ipc/ipc_param_traits.h"
12 #include "ui/gfx/ipc/skia/gfx_skia_ipc_export.h" 12 #include "ui/gfx/ipc/skia/gfx_skia_ipc_export.h"
13 13
14 class SkBitmap; 14 class SkBitmap;
15 15
16 namespace base { 16 namespace base {
17 class Pickle; 17 class Pickle;
18 class PickleIterator; 18 class PickleIterator;
19 } 19 }
20 20
21 namespace gfx { 21 namespace gfx {
22 class Transform; 22 class Transform;
23 } 23 }
24 24
25 namespace IPC { 25 namespace IPC {
26 26
27 template <> 27 template <>
28 struct GFX_SKIA_IPC_EXPORT ParamTraits<SkBitmap> { 28 struct GFX_SKIA_IPC_EXPORT ParamTraits<SkBitmap> {
29 using param_type = SkBitmap; 29 using param_type = SkBitmap;
30 static void GetSize(base::PickleSizer* s, const param_type& p);
30 static void Write(base::Pickle* m, const param_type& p); 31 static void Write(base::Pickle* m, const param_type& p);
31 static bool Read(const base::Pickle* m, 32 static bool Read(const base::Pickle* m,
32 base::PickleIterator* iter, 33 base::PickleIterator* iter,
33 param_type* r); 34 param_type* r);
34 static void Log(const param_type& p, std::string* l); 35 static void Log(const param_type& p, std::string* l);
35 }; 36 };
36 37
37 template <> 38 template <>
38 struct GFX_SKIA_IPC_EXPORT ParamTraits<gfx::Transform> { 39 struct GFX_SKIA_IPC_EXPORT ParamTraits<gfx::Transform> {
39 using param_type = gfx::Transform; 40 using param_type = gfx::Transform;
41 static void GetSize(base::PickleSizer* s, const param_type& p);
40 static void Write(base::Pickle* m, const param_type& p); 42 static void Write(base::Pickle* m, const param_type& p);
41 static bool Read(const base::Pickle* m, 43 static bool Read(const base::Pickle* m,
42 base::PickleIterator* iter, 44 base::PickleIterator* iter,
43 param_type* r); 45 param_type* r);
44 static void Log(const param_type& p, std::string* l); 46 static void Log(const param_type& p, std::string* l);
45 }; 47 };
46 48
47 } // namespace IPC 49 } // namespace IPC
48 50
49 #endif // UI_GFX_IPC_GFX_SKIA_PARAM_TRAITS_H_ 51 #endif // UI_GFX_IPC_GFX_SKIA_PARAM_TRAITS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698