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

Unified Diff: base/values.cc

Issue 4924001: JavaScript to Value bridge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix documentation. Created 10 years 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 | « base/values.h ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/values.cc
diff --git a/base/values.cc b/base/values.cc
index c6a377f63f0c386e3cca0dffcd9d8be26143d4e5..b06df125dd1fc2a6e5d8a969e31baddaea31de51 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -119,6 +119,10 @@ bool Value::GetAsString(string16* out_value) const {
return false;
}
+bool Value::GetAsList(ListValue** out_value) {
+ return false;
+}
+
Value* Value::DeepCopy() const {
// This method should only be getting called for null Values--all subclasses
// need to provide their own implementation;.
@@ -961,6 +965,12 @@ bool ListValue::Insert(size_t index, Value* in_value) {
return true;
}
+bool ListValue::GetAsList(ListValue** out_value) {
+ if (out_value)
+ *out_value = this;
+ return true;
+}
+
Value* ListValue::DeepCopy() const {
ListValue* result = new ListValue;
« no previous file with comments | « base/values.h ('k') | chrome/browser/renderer_host/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698