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

Unified Diff: content/public/renderer/v8_value_converter.h

Issue 248903003: Extend V8ValueConverter::Strategy for the needs of Gin Java Bridge (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tranquillize clang Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/v8_value_converter_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cac1247bdd930cf6c02ba74a29af13ee43ea11e9..725980e2c7c92df683c5afc32685e530c67cf957 100644
--- a/content/public/renderer/v8_value_converter.h
+++ b/content/public/renderer/v8_value_converter.h
@@ -40,7 +40,7 @@ class CONTENT_EXPORT V8ValueConverter {
virtual bool FromV8Object(v8::Handle<v8::Object> value,
base::Value** out,
v8::Isolate* isolate,
- const FromV8ValueCallback& callback) const = 0;
+ const FromV8ValueCallback& callback) const;
// If false is returned, V8ValueConverter proceeds with the default
// behavior.
@@ -49,7 +49,23 @@ class CONTENT_EXPORT V8ValueConverter {
virtual bool FromV8Array(v8::Handle<v8::Array> value,
base::Value** out,
v8::Isolate* isolate,
- const FromV8ValueCallback& callback) const = 0;
+ const FromV8ValueCallback& callback) const;
+
+ // If false is returned, V8ValueConverter proceeds with the default
+ // behavior. v8::Object is passed as ArrayBuffer and ArrayBufferView
+ // classes are siblings.
+ virtual bool FromV8ArrayBuffer(v8::Handle<v8::Object> value,
+ base::Value** out) const;
+
+ // If false is returned, V8ValueConverter proceeds with the default
+ // behavior. This allows to intercept "non-finite" values and do something
+ // with them.
+ virtual bool FromV8Number(v8::Handle<v8::Number> value,
+ base::Value** out) const;
+
+ // If false is returned, V8ValueConverter proceeds with the default
+ // behavior.
+ virtual bool FromV8Undefined(base::Value** out) const;
};
static V8ValueConverter* create();
« no previous file with comments | « no previous file | content/renderer/v8_value_converter_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698