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

Side by Side Diff: mojo/public/tools/bindings/generators/cpp_templates/module-internal.h.tmpl

Issue 1526533002: [mojo] Add pickling support for native-only structs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bindings-4-bool-deserialize
Patch Set: merge Created 5 years 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 {%- if variant -%} 5 {%- if variant -%}
6 {%- set variant_path = "%s-%s"|format(module.path, variant) -%} 6 {%- set variant_path = "%s-%s"|format(module.path, variant) -%}
7 {%- else -%} 7 {%- else -%}
8 {%- set variant_path = module.path -%} 8 {%- set variant_path = module.path -%}
9 {%- endif -%} 9 {%- endif -%}
10 10
11 {%- set header_guard = "%s_INTERNAL_H_"|format( 11 {%- set header_guard = "%s_INTERNAL_H_"|format(
12 variant_path|upper|replace("/","_")|replace(".","_")| 12 variant_path|upper|replace("/","_")|replace(".","_")|
13 replace("-", "_")) %} 13 replace("-", "_")) %}
14 14
15 #ifndef {{header_guard}} 15 #ifndef {{header_guard}}
16 #define {{header_guard}} 16 #define {{header_guard}}
17 17
18 #include "mojo/public/cpp/bindings/lib/bindings_internal.h" 18 #include "mojo/public/cpp/bindings/lib/bindings_internal.h"
19 #include "mojo/public/cpp/bindings/lib/buffer.h" 19 #include "mojo/public/cpp/bindings/lib/buffer.h"
20 #include "mojo/public/cpp/bindings/lib/native_serialization.h"
20 #include "mojo/public/cpp/bindings/lib/union_accessor.h" 21 #include "mojo/public/cpp/bindings/lib/union_accessor.h"
21 #include "mojo/public/cpp/bindings/lib/value_traits.h" 22 #include "mojo/public/cpp/bindings/lib/value_traits.h"
22 #include "mojo/public/cpp/bindings/struct_ptr.h" 23 #include "mojo/public/cpp/bindings/struct_ptr.h"
24 {%- for header in extra_headers %}
25 #include "{{header}}"
26 {%- endfor %}
23 27
24 {%- for import in imports %} 28 {%- for import in imports %}
25 #include "{{import.module.path}}-internal.h" 29 #include "{{import.module.path}}-internal.h"
26 {%- endfor %} 30 {%- endfor %}
27 31
28 namespace mojo { 32 namespace mojo {
29 namespace internal { 33 namespace internal {
30 class BoundsChecker; 34 class BoundsChecker;
31 } 35 }
32 } 36 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 80
77 } // namespace internal 81 } // namespace internal
78 {%- if variant %} 82 {%- if variant %}
79 } // namespace {{variant}} 83 } // namespace {{variant}}
80 {%- endif %} 84 {%- endif %}
81 {%- for namespace in namespaces_as_array|reverse %} 85 {%- for namespace in namespaces_as_array|reverse %}
82 } // namespace {{namespace}} 86 } // namespace {{namespace}}
83 {%- endfor %} 87 {%- endfor %}
84 88
85 #endif // {{header_guard}} 89 #endif // {{header_guard}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698