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

Unified Diff: webkit/glue/cpp_variant.h

Issue 6254018: Allow chrome.send to pass number, boolean, null and arrays of those (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace and comments Created 9 years, 11 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: webkit/glue/cpp_variant.h
diff --git a/webkit/glue/cpp_variant.h b/webkit/glue/cpp_variant.h
index 34f843a90a2cb31d811e89c865454a87f6907362..6ac866737accbfce4cc508be8c4103ec40995749 100644
--- a/webkit/glue/cpp_variant.h
+++ b/webkit/glue/cpp_variant.h
@@ -97,6 +97,10 @@ class CppVariant : public NPVariant {
// Returns a vector of strings for the specified argument. This is useful
// for converting a JavaScript array of strings into a vector of strings.
std::vector<std::string> ToStringVector() const;
+ // Returns a vector of CppVariant for the specified variant. This should only
+ // be called on an Object. If the object has no "length" property an empty
+ // vector is returned.
+ std::vector<CppVariant> ToVector() const;
// Invoke method of the given name on an object with the supplied arguments.
// The first argument should be the object on which the method is to be

Powered by Google App Engine
This is Rietveld 408576698