OLD | NEW |
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 ErrorSupport_h | 5 #ifndef {{"_".join(config.protocol.namespace)}}_ErrorSupport_h |
6 #define ErrorSupport_h | 6 #define {{"_".join(config.protocol.namespace)}}_ErrorSupport_h |
7 | 7 |
8 //#include "Platform.h" | 8 //#include "Forward.h" |
9 //#include "String16.h" | |
10 #include "{{config.class_export.header}}" | |
11 | 9 |
12 #include <vector> | 10 {% for namespace in config.protocol.namespace %} |
13 | 11 namespace {{namespace}} { |
14 namespace blink { | 12 {% endfor %} |
15 namespace protocol { | |
16 | |
17 using ErrorString = String16; | |
18 | 13 |
19 class {{config.class_export.macro}} ErrorSupport { | 14 class {{config.class_export.macro}} ErrorSupport { |
20 public: | 15 public: |
21 ErrorSupport(); | 16 ErrorSupport(); |
22 ErrorSupport(String16* errorString); | 17 ErrorSupport(String* errorString); |
23 ~ErrorSupport(); | 18 ~ErrorSupport(); |
24 | 19 |
25 void push(); | 20 void push(); |
26 void setName(const String16&); | 21 void setName(const String&); |
27 void pop(); | 22 void pop(); |
28 void addError(const String16&); | 23 void addError(const String&); |
29 bool hasErrors(); | 24 bool hasErrors(); |
30 String16 errors(); | 25 String errors(); |
31 | 26 |
32 private: | 27 private: |
33 std::vector<String16> m_path; | 28 std::vector<String> m_path; |
34 std::vector<String16> m_errors; | 29 std::vector<String> m_errors; |
35 String16* m_errorString; | 30 String* m_errorString; |
36 }; | 31 }; |
37 | 32 |
38 } // namespace platform | 33 {% for namespace in config.protocol.namespace %} |
39 } // namespace blink | 34 } // namespace {{namespace}} |
| 35 {% endfor %} |
40 | 36 |
41 using blink::protocol::ErrorString; | 37 #endif // !defined({{"_".join(config.protocol.namespace)}}_ErrorSupport_h) |
42 | |
43 #endif // !defined(ErrorSupport_h) | |
OLD | NEW |