OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ |
6 #define CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ | 6 #define CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 virtual base::Value* FromV8Value( | 37 virtual base::Value* FromV8Value( |
38 v8::Handle<v8::Value> value, | 38 v8::Handle<v8::Value> value, |
39 v8::Handle<v8::Context> context) const OVERRIDE; | 39 v8::Handle<v8::Context> context) const OVERRIDE; |
40 | 40 |
41 private: | 41 private: |
42 friend class ScopedAvoidIdentityHashForTesting; | 42 friend class ScopedAvoidIdentityHashForTesting; |
43 | 43 |
44 class FromV8ValueState; | 44 class FromV8ValueState; |
45 | 45 |
46 v8::Local<v8::Value> ToV8ValueImpl(v8::Isolate* isolate, | 46 v8::Local<v8::Value> ToV8ValueImpl(v8::Isolate* isolate, |
47 const base::Value* value) const; | 47 v8::Handle<v8::Object> creation_context, |
| 48 const base::Value* value) const; |
48 v8::Handle<v8::Value> ToV8Array(v8::Isolate* isolate, | 49 v8::Handle<v8::Value> ToV8Array(v8::Isolate* isolate, |
| 50 v8::Handle<v8::Object> creation_context, |
49 const base::ListValue* list) const; | 51 const base::ListValue* list) const; |
50 v8::Handle<v8::Value> ToV8Object( | 52 v8::Handle<v8::Value> ToV8Object( |
51 v8::Isolate* isolate, | 53 v8::Isolate* isolate, |
| 54 v8::Handle<v8::Object> creation_context, |
52 const base::DictionaryValue* dictionary) const; | 55 const base::DictionaryValue* dictionary) const; |
53 v8::Handle<v8::Value> ToArrayBuffer(const base::BinaryValue* value) const; | 56 v8::Handle<v8::Value> ToArrayBuffer(v8::Isolate* isolate, |
| 57 v8::Handle<v8::Object> creation_context, |
| 58 const base::BinaryValue* value) const; |
54 | 59 |
55 base::Value* FromV8ValueImpl(FromV8ValueState* state, | 60 base::Value* FromV8ValueImpl(FromV8ValueState* state, |
56 v8::Handle<v8::Value> value, | 61 v8::Handle<v8::Value> value, |
57 v8::Isolate* isolate) const; | 62 v8::Isolate* isolate) const; |
58 base::Value* FromV8Array(v8::Handle<v8::Array> array, | 63 base::Value* FromV8Array(v8::Handle<v8::Array> array, |
59 FromV8ValueState* state, | 64 FromV8ValueState* state, |
60 v8::Isolate* isolate) const; | 65 v8::Isolate* isolate) const; |
61 | 66 |
62 // This will convert objects of type ArrayBuffer or any of the | 67 // This will convert objects of type ArrayBuffer or any of the |
63 // ArrayBufferView subclasses. | 68 // ArrayBufferView subclasses. |
(...skipping 21 matching lines...) Expand all Loading... |
85 | 90 |
86 // Strategy object that changes the converter's behavior. | 91 // Strategy object that changes the converter's behavior. |
87 Strategy* strategy_; | 92 Strategy* strategy_; |
88 | 93 |
89 DISALLOW_COPY_AND_ASSIGN(V8ValueConverterImpl); | 94 DISALLOW_COPY_AND_ASSIGN(V8ValueConverterImpl); |
90 }; | 95 }; |
91 | 96 |
92 } // namespace content | 97 } // namespace content |
93 | 98 |
94 #endif // CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ | 99 #endif // CONTENT_RENDERER_V8_VALUE_CONVERTER_IMPL_H_ |
OLD | NEW |