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

Unified Diff: ppapi/cpp/var.h

Issue 12387073: Add PPB_VarDictionary_Dev support - part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 7 years, 9 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 | « ppapi/cpp/dev/var_dictionary_dev.cc ('k') | ppapi/cpp/var.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/var.h
diff --git a/ppapi/cpp/var.h b/ppapi/cpp/var.h
index d114054daa1b390c4c60cacdbfb9d4a559e51e29..77bb5d8311b7ceba5d948001b82f8b590480fa59 100644
--- a/ppapi/cpp/var.h
+++ b/ppapi/cpp/var.h
@@ -122,9 +122,19 @@ class Var {
/// This function determines if this <code>Var</code> is an object.
///
- /// @return true if this <code>Var</code> is an object, otherwise false.
+ /// @return true if this <code>Var</code> is an object, otherwise false.
bool is_object() const { return var_.type == PP_VARTYPE_OBJECT; }
+ /// This function determines if this <code>Var</code> is an array.
+ ///
+ /// @return true if this <code>Var</code> is an array, otherwise false.
+ bool is_array() const { return var_.type == PP_VARTYPE_ARRAY; }
+
+ /// This function determines if this <code>Var</code> is a dictionary.
+ ///
+ /// @return true if this <code>Var</code> is a dictinoary, otherwise false.
+ bool is_dictionary() const { return var_.type == PP_VARTYPE_DICTIONARY; }
+
/// This function determines if this <code>Var</code> is an integer value.
/// The <code>is_int</code> function returns the internal representation.
/// The JavaScript runtime may convert between the two as needed, so the
« no previous file with comments | « ppapi/cpp/dev/var_dictionary_dev.cc ('k') | ppapi/cpp/var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698