| Index: content/public/renderer/v8_value_converter.h
|
| diff --git a/content/public/renderer/v8_value_converter.h b/content/public/renderer/v8_value_converter.h
|
| index b71b32dae3ab6563f5040485fcd9bc8b8d340364..7c43a172bff341d3267221103c0596d5eb6af52f 100644
|
| --- a/content/public/renderer/v8_value_converter.h
|
| +++ b/content/public/renderer/v8_value_converter.h
|
| @@ -24,7 +24,20 @@ namespace content {
|
| // ArrayBufferView subclasses (Uint8Array, etc.).
|
| class CONTENT_EXPORT V8ValueConverter {
|
| public:
|
| - static V8ValueConverter* create();
|
| + // Extends the default behaviour of V8ValueConverter.
|
| + class CONTENT_EXPORT Strategy {
|
| + public:
|
| + // If false is returned, V8ValueConverter proceeds with the default
|
| + // behavior.
|
| + virtual bool FromV8Object(v8::Handle<v8::Object> value,
|
| + base::Value** out) const = 0;
|
| + // If false is returned, V8ValueConverter proceeds with the default
|
| + // behavior.
|
| + virtual bool FromV8Array(v8::Handle<v8::Array> value,
|
| + base::Value** out) const = 0;
|
| + };
|
| +
|
| + static V8ValueConverter* create();
|
|
|
| virtual ~V8ValueConverter() {}
|
|
|
| @@ -52,6 +65,9 @@ class CONTENT_EXPORT V8ValueConverter {
|
| // converting arguments to extension APIs.
|
| virtual void SetStripNullFromObjects(bool val) = 0;
|
|
|
| + // Extend default behavior of V8ValueConverter.
|
| + virtual void SetStrategy(Strategy* strategy) = 0;
|
| +
|
| // Converts a base::Value to a v8::Value.
|
| //
|
| // Unsupported types are replaced with null. If an array or object throws
|
|
|