| 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; | |
| 172 void remove(const String16& name); | 171 void remove(const String16& name); |
| 173 | 172 |
| 174 ~DictionaryValue() override; | 173 ~DictionaryValue() override; |
| 175 | 174 |
| 176 private: | 175 private: |
| 177 DictionaryValue(); | 176 DictionaryValue(); |
| 178 | 177 |
| 179 using Dictionary = protocol::HashMap<String16, OwnPtr<Value>>; | 178 using Dictionary = protocol::HashMap<String16, OwnPtr<Value>>; |
| 180 Dictionary m_data; | 179 Dictionary m_data; |
| 181 protocol::Vector<String16> m_order; | 180 protocol::Vector<String16> m_order; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 212 | 211 |
| 213 private: | 212 private: |
| 214 ListValue(); | 213 ListValue(); |
| 215 protocol::Vector<OwnPtr<Value>> m_data; | 214 protocol::Vector<OwnPtr<Value>> m_data; |
| 216 }; | 215 }; |
| 217 | 216 |
| 218 } // namespace protocol | 217 } // namespace protocol |
| 219 } // namespace blink | 218 } // namespace blink |
| 220 | 219 |
| 221 #endif // Values_h | 220 #endif // Values_h |
| OLD | NEW |