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 JSONValuesForV8_h | 5 #ifndef JSONValuesForV8_h |
6 #define JSONValuesForV8_h | 6 #define JSONValuesForV8_h |
7 | 7 |
8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
9 #include "platform/json/JSONValues.h" | 9 #include "platform/json/JSONValues.h" |
10 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
11 #include <v8.h> | 11 #include <v8.h> |
12 | 12 |
13 namespace blink { | 13 namespace blink { |
14 | 14 |
15 class ExceptionState; | 15 class ExceptionState; |
16 class ScriptState; | 16 class ScriptState; |
17 | 17 |
18 CORE_EXPORT std::unique_ptr<JSONValue> toJSONValue( | |
19 v8::Local<v8::Context>, | |
20 v8::Local<v8::Value>, | |
21 int maxDepth = JSONValue::maxDepth); | |
22 | |
23 CORE_EXPORT v8::Local<v8::Value> fromJSONString(ScriptState*, | 18 CORE_EXPORT v8::Local<v8::Value> fromJSONString(ScriptState*, |
24 const String& stringifiedJSON, | 19 const String& stringifiedJSON, |
25 ExceptionState&); | 20 ExceptionState&); |
26 | 21 |
27 } // namespace blink | 22 } // namespace blink |
28 | 23 |
29 #endif // JSONValuesForV8_h | 24 #endif // JSONValuesForV8_h |
OLD | NEW |