| 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 Values_h | 5 #ifndef Values_h |
| 6 #define Values_h | 6 #define Values_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/inspector_protocol/Allocator.h" | 9 #include "platform/inspector_protocol/Allocator.h" |
| 10 #include "platform/inspector_protocol/Collections.h" | 10 #include "platform/inspector_protocol/Collections.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 return value->asNumber(output); | 161 return value->asNumber(output); |
| 162 } | 162 } |
| 163 bool getString(const String16& name, String16* output) const; | 163 bool getString(const String16& name, String16* output) const; |
| 164 | 164 |
| 165 DictionaryValue* getObject(const String16& name) const; | 165 DictionaryValue* getObject(const String16& name) const; |
| 166 ListValue* getArray(const String16& name) const; | 166 ListValue* getArray(const String16& name) const; |
| 167 Value* get(const String16& name) const; | 167 Value* get(const String16& name) const; |
| 168 Entry at(size_t index) const; | 168 Entry at(size_t index) const; |
| 169 | 169 |
| 170 bool booleanProperty(const String16& name, bool defaultValue) const; | 170 bool booleanProperty(const String16& name, bool defaultValue) const; |
| 171 double numberProperty(const String16& name, double defaultValue) const; |
| 171 void remove(const String16& name); | 172 void remove(const String16& name); |
| 172 | 173 |
| 173 ~DictionaryValue() override; | 174 ~DictionaryValue() override; |
| 174 | 175 |
| 175 private: | 176 private: |
| 176 DictionaryValue(); | 177 DictionaryValue(); |
| 177 | 178 |
| 178 using Dictionary = protocol::HashMap<String16, OwnPtr<Value>>; | 179 using Dictionary = protocol::HashMap<String16, OwnPtr<Value>>; |
| 179 Dictionary m_data; | 180 Dictionary m_data; |
| 180 protocol::Vector<String16> m_order; | 181 protocol::Vector<String16> m_order; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 211 | 212 |
| 212 private: | 213 private: |
| 213 ListValue(); | 214 ListValue(); |
| 214 protocol::Vector<OwnPtr<Value>> m_data; | 215 protocol::Vector<OwnPtr<Value>> m_data; |
| 215 }; | 216 }; |
| 216 | 217 |
| 217 } // namespace protocol | 218 } // namespace protocol |
| 218 } // namespace blink | 219 } // namespace blink |
| 219 | 220 |
| 220 #endif // Values_h | 221 #endif // Values_h |
| OLD | NEW |