diff options
author | scottbyer@google.com <scottbyer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 00:35:29 +0000 |
---|---|---|
committer | scottbyer@google.com <scottbyer@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-07 00:35:29 +0000 |
commit | 81f9fe0bab7a81021591e094eb1bf9489ebbfb26 (patch) | |
tree | 167a15c8bc153eab98698a1f9c16e82f68128c09 /base/values.cc | |
parent | 3c3a51f652ca6ad9279f3bbb93635a5a09c5ec1d (diff) | |
download | chromium_src-81f9fe0bab7a81021591e094eb1bf9489ebbfb26.zip chromium_src-81f9fe0bab7a81021591e094eb1bf9489ebbfb26.tar.gz chromium_src-81f9fe0bab7a81021591e094eb1bf9489ebbfb26.tar.bz2 |
JavaScript to Value bridge.
Add more values that we can get back from JavaScript. Very useful for writing
additional DOMUI browser test, and maybe in other cases as well.
BUG=none
TEST=RenderViewHostTest.ExecuteJavascriptInWebFrameNotifyResult
Review URL: http://codereview.chromium.org/4924001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68416 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/values.cc')
-rw-r--r-- | base/values.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/base/values.cc b/base/values.cc index c6a377f..b06df12 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; |