| 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 Array_h | 5 #ifndef Array_h |
| 6 #define Array_h | 6 #define Array_h |
| 7 | 7 |
| 8 #include "platform/inspector_protocol/ErrorSupport.h" | 8 #include "platform/inspector_protocol/ErrorSupport.h" |
| 9 #include "platform/inspector_protocol/Platform.h" | 9 #include "platform/inspector_protocol/Platform.h" |
| 10 #include "platform/inspector_protocol/String16.h" | 10 #include "platform/inspector_protocol/String16.h" |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 std::unique_ptr<protocol::ListValue> result = ListValue::create(); | 119 std::unique_ptr<protocol::ListValue> result = ListValue::create(); |
| 120 for (auto& item : m_vector) | 120 for (auto& item : m_vector) |
| 121 result->pushValue(ValueConversions<T>::serialize(item)); | 121 result->pushValue(ValueConversions<T>::serialize(item)); |
| 122 return result; | 122 return result; |
| 123 } | 123 } |
| 124 | 124 |
| 125 private: | 125 private: |
| 126 std::vector<T> m_vector; | 126 std::vector<T> m_vector; |
| 127 }; | 127 }; |
| 128 | 128 |
| 129 template<> class Array<String> : public ArrayBase<String> {}; | 129 template<> class Array<InspectorProtocolConvenienceStringType> : public ArrayBas
e<InspectorProtocolConvenienceStringType> {}; |
| 130 template<> class Array<String16> : public ArrayBase<String16> {}; | 130 template<> class Array<String16> : public ArrayBase<String16> {}; |
| 131 template<> class Array<int> : public ArrayBase<int> {}; | 131 template<> class Array<int> : public ArrayBase<int> {}; |
| 132 template<> class Array<double> : public ArrayBase<double> {}; | 132 template<> class Array<double> : public ArrayBase<double> {}; |
| 133 template<> class Array<bool> : public ArrayBase<bool> {}; | 133 template<> class Array<bool> : public ArrayBase<bool> {}; |
| 134 | 134 |
| 135 } // namespace platform | 135 } // namespace platform |
| 136 } // namespace blink | 136 } // namespace blink |
| 137 | 137 |
| 138 #endif // !defined(Array_h) | 138 #endif // !defined(Array_h) |
| OLD | NEW |