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

Side by Side Diff: third_party/WebKit/Source/platform/inspector_protocol/Array.h

Issue 2226863003: [DevTools] Reduce API surface of String16. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 4 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 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
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)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698