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

Side by Side Diff: third_party/WebKit/Source/platform/JSONValues.h

Issue 1621923002: [DevTools] Remove InspectorState. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments Created 4 years, 11 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 RefPtr<JSONValue> value = get(name); 203 RefPtr<JSONValue> value = get(name);
204 if (!value) 204 if (!value)
205 return false; 205 return false;
206 return value->asNumber(output); 206 return value->asNumber(output);
207 } 207 }
208 bool getString(const String& name, String* output) const; 208 bool getString(const String& name, String* output) const;
209 PassRefPtr<JSONObject> getObject(const String& name) const; 209 PassRefPtr<JSONObject> getObject(const String& name) const;
210 PassRefPtr<JSONArray> getArray(const String& name) const; 210 PassRefPtr<JSONArray> getArray(const String& name) const;
211 PassRefPtr<JSONValue> get(const String& name) const; 211 PassRefPtr<JSONValue> get(const String& name) const;
212 212
213 bool booleanProperty(const String& name, bool defaultValue) const;
214
213 void remove(const String& name); 215 void remove(const String& name);
214 216
215 void prettyWriteJSONInternal(StringBuilder* output, int depth) const overrid e; 217 void prettyWriteJSONInternal(StringBuilder* output, int depth) const overrid e;
216 218
217 iterator begin() { return m_data.begin(); } 219 iterator begin() { return m_data.begin(); }
218 iterator end() { return m_data.end(); } 220 iterator end() { return m_data.end(); }
219 const_iterator begin() const { return m_data.begin(); } 221 const_iterator begin() const { return m_data.begin(); }
220 const_iterator end() const { return m_data.end(); } 222 const_iterator end() const { return m_data.end(); }
221 223
222 protected: 224 protected:
(...skipping 21 matching lines...) Expand all
244 using JSONObjectBase::setArray; 246 using JSONObjectBase::setArray;
245 247
246 using JSONObjectBase::find; 248 using JSONObjectBase::find;
247 using JSONObjectBase::getBoolean; 249 using JSONObjectBase::getBoolean;
248 using JSONObjectBase::getNumber; 250 using JSONObjectBase::getNumber;
249 using JSONObjectBase::getString; 251 using JSONObjectBase::getString;
250 using JSONObjectBase::getObject; 252 using JSONObjectBase::getObject;
251 using JSONObjectBase::getArray; 253 using JSONObjectBase::getArray;
252 using JSONObjectBase::get; 254 using JSONObjectBase::get;
253 255
256 using JSONObjectBase::booleanProperty;
257
254 using JSONObjectBase::remove; 258 using JSONObjectBase::remove;
255 259
256 using JSONObjectBase::begin; 260 using JSONObjectBase::begin;
257 using JSONObjectBase::end; 261 using JSONObjectBase::end;
258 262
259 using JSONObjectBase::size; 263 using JSONObjectBase::size;
260 }; 264 };
261 265
262 266
263 class PLATFORM_EXPORT JSONArrayBase : public JSONValue { 267 class PLATFORM_EXPORT JSONArrayBase : public JSONValue {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 using JSONArrayBase::begin; 326 using JSONArrayBase::begin;
323 using JSONArrayBase::end; 327 using JSONArrayBase::end;
324 }; 328 };
325 329
326 PLATFORM_EXPORT void escapeStringForJSON(const String&, StringBuilder*); 330 PLATFORM_EXPORT void escapeStringForJSON(const String&, StringBuilder*);
327 void doubleQuoteStringForJSON(const String&, StringBuilder*); 331 void doubleQuoteStringForJSON(const String&, StringBuilder*);
328 332
329 } // namespace blink 333 } // namespace blink
330 334
331 #endif // JSONValues_h 335 #endif // JSONValues_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698