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

Unified Diff: content/renderer/v8_value_converter_impl.h

Issue 10161038: Allow serialization of ArrayBuffer params in extension/apps API methods (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes for review feedback and browser test failures Created 8 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/renderer/v8_value_converter_impl.h
diff --git a/content/renderer/v8_value_converter_impl.h b/content/renderer/v8_value_converter_impl.h
index ac6e7b7e6095f93ced57b6822f1b9d7b572a9080..c43da46ab7489b42b0eac5369b47a107935a7fd1 100644
--- a/content/renderer/v8_value_converter_impl.h
+++ b/content/renderer/v8_value_converter_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -10,6 +10,7 @@
#include "content/public/renderer/v8_value_converter.h"
namespace base {
+class BinaryValue;
class DictionaryValue;
class ListValue;
class Value;
@@ -43,9 +44,16 @@ class CONTENT_EXPORT V8ValueConverterImpl : public content::V8ValueConverter {
v8::Handle<v8::Value> ToV8Array(const base::ListValue* list) const;
v8::Handle<v8::Value> ToV8Object(
const base::DictionaryValue* dictionary) const;
+ v8::Handle<v8::Value> ToArrayBuffer(const base::BinaryValue* value) const;
base::Value* FromV8ValueImpl(v8::Handle<v8::Value> value) const;
base::ListValue* FromV8Array(v8::Handle<v8::Array> array) const;
+
+ // This will convert objects of type ArrayBuffer or any of the
+ // ArrayBufferView subclasses. The return value will be NULL if |value| is
+ // not one of these types.
+ base::BinaryValue* FromV8Buffer(v8::Handle<v8::Value> value) const;
+
base::DictionaryValue* FromV8Object(v8::Handle<v8::Object> object) const;
// If true, we will convert undefined JavaScript values to null.

Powered by Google App Engine
This is Rietveld 408576698