diff options
author | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-06 20:10:37 +0000 |
---|---|---|
committer | adamk@chromium.org <adamk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-06 20:10:37 +0000 |
commit | 8d5e5145b65673eaf3aa521c4707031ed0a81031 (patch) | |
tree | 902a9a35cf7ea7d30699ceb3d243a88e6f06ae34 /content/renderer | |
parent | be9ba250e3e366435577f8cf6320e256063be7dd (diff) | |
download | chromium_src-8d5e5145b65673eaf3aa521c4707031ed0a81031.zip chromium_src-8d5e5145b65673eaf3aa521c4707031ed0a81031.tar.gz chromium_src-8d5e5145b65673eaf3aa521c4707031ed0a81031.tar.bz2 |
Update callers of WebArrayBuffer/V8 conversions to use WebArrayBufferConverter
This will allow moving WebArrayBuffer's implementation into Blink's platform dll.
Depends on https://src.chromium.org/viewvc/blink?view=rev&revision=166514
BUG=297477
Review URL: https://codereview.chromium.org/149133005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r-- | content/renderer/pepper/v8_var_converter.cc | 6 | ||||
-rw-r--r-- | content/renderer/skia_benchmarking_extension.cc | 4 | ||||
-rw-r--r-- | content/renderer/v8_value_converter_impl.cc | 5 |
3 files changed, 10 insertions, 5 deletions
diff --git a/content/renderer/pepper/v8_var_converter.cc b/content/renderer/pepper/v8_var_converter.cc index f2d7271..2ac7979 100644 --- a/content/renderer/pepper/v8_var_converter.cc +++ b/content/renderer/pepper/v8_var_converter.cc @@ -21,6 +21,7 @@ #include "ppapi/shared_impl/var.h" #include "ppapi/shared_impl/var_tracker.h" #include "third_party/WebKit/public/platform/WebArrayBuffer.h" +#include "third_party/WebKit/public/web/WebArrayBufferConverter.h" using ppapi::ArrayBufferVar; using ppapi::ArrayVar; @@ -143,7 +144,8 @@ bool GetOrCreateV8Value(v8::Isolate* isolate, } HostArrayBufferVar* host_buffer = static_cast<HostArrayBufferVar*>(buffer); - *result = host_buffer->webkit_buffer().toV8Value(); + *result = blink::WebArrayBufferConverter::toV8Value( + &host_buffer->webkit_buffer()); break; } case PP_VARTYPE_ARRAY: @@ -213,7 +215,7 @@ bool GetOrCreateVar(v8::Handle<v8::Value> val, *result = (new ArrayVar())->GetPPVar(); } else if (val->IsObject()) { scoped_ptr<blink::WebArrayBuffer> web_array_buffer( - blink::WebArrayBuffer::createFromV8Value(val)); + blink::WebArrayBufferConverter::createFromV8Value(val)); if (web_array_buffer.get()) { scoped_refptr<HostArrayBufferVar> buffer_var(new HostArrayBufferVar( *web_array_buffer)); diff --git a/content/renderer/skia_benchmarking_extension.cc b/content/renderer/skia_benchmarking_extension.cc index 7e8979a..7c957a5 100644 --- a/content/renderer/skia_benchmarking_extension.cc +++ b/content/renderer/skia_benchmarking_extension.cc @@ -16,6 +16,7 @@ #include "gin/object_template_builder.h" #include "skia/ext/benchmarking_canvas.h" #include "third_party/WebKit/public/platform/WebArrayBuffer.h" +#include "third_party/WebKit/public/web/WebArrayBufferConverter.h" #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebKit.h" #include "third_party/skia/include/core/SkBitmapDevice.h" @@ -199,7 +200,8 @@ void SkiaBenchmarking::Rasterize(gin::Arguments* args) { v8::Number::New(isolate, snapped_clip.width())); result->Set(v8::String::NewFromUtf8(isolate, "height"), v8::Number::New(isolate, snapped_clip.height())); - result->Set(v8::String::NewFromUtf8(isolate, "data"), buffer.toV8Value()); + result->Set(v8::String::NewFromUtf8(isolate, "data"), + blink::WebArrayBufferConverter::toV8Value(&buffer)); args->Return(result); } diff --git a/content/renderer/v8_value_converter_impl.cc b/content/renderer/v8_value_converter_impl.cc index 09fad30..a7d3bbd 100644 --- a/content/renderer/v8_value_converter_impl.cc +++ b/content/renderer/v8_value_converter_impl.cc @@ -11,6 +11,7 @@ #include "base/memory/scoped_ptr.h" #include "base/values.h" #include "third_party/WebKit/public/platform/WebArrayBuffer.h" +#include "third_party/WebKit/public/web/WebArrayBufferConverter.h" #include "third_party/WebKit/public/web/WebArrayBufferView.h" #include "v8/include/v8.h" @@ -228,7 +229,7 @@ v8::Handle<v8::Value> V8ValueConverterImpl::ToArrayBuffer( blink::WebArrayBuffer buffer = blink::WebArrayBuffer::create(value->GetSize(), 1); memcpy(buffer.data(), value->GetBuffer(), value->GetSize()); - return buffer.toV8Value(); + return blink::WebArrayBufferConverter::toV8Value(&buffer); } base::Value* V8ValueConverterImpl::FromV8ValueImpl( @@ -357,7 +358,7 @@ base::BinaryValue* V8ValueConverterImpl::FromV8Buffer( size_t length = 0; scoped_ptr<blink::WebArrayBuffer> array_buffer( - blink::WebArrayBuffer::createFromV8Value(val)); + blink::WebArrayBufferConverter::createFromV8Value(val)); scoped_ptr<blink::WebArrayBufferView> view; if (array_buffer) { data = reinterpret_cast<char*>(array_buffer->data()); |