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

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: 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
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..8891f623c044e831a8833a5452740237a289d8e4 100644
--- a/content/public/renderer/v8_value_converter.h
+++ b/content/public/renderer/v8_value_converter.h
@@ -50,6 +50,22 @@ class CONTENT_EXPORT V8ValueConverter {
base::Value** out,
v8::Isolate* isolate,
const FromV8ValueCallback& callback) const = 0;
+
+ // 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 = 0;
jochen (gone - plz use gerrit) 2014/04/23 15:17:33 what about providing a default implementation that
mnaganov (inactive) 2014/04/23 15:23:12 Are you suggesting making the Strategy class non-a
+
+ // 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 = 0;
+
+ // If false is returned, V8ValueConverter proceeds with the default
+ // behavior.
+ virtual bool FromV8Undefined(base::Value** out) const = 0;
};
static V8ValueConverter* create();
« no previous file with comments | « chrome/renderer/extensions/activity_log_converter_strategy.cc ('k') | content/renderer/v8_value_converter_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698