| Index: ppapi/thunk/ppb_url_loader_thunk.cc
|
| diff --git a/ppapi/thunk/ppb_url_loader_thunk.cc b/ppapi/thunk/ppb_url_loader_thunk.cc
|
| index 23113cd1ce7aff0d65276b46e71df536cabc3db1..00fd0bac5c060c671e3ff8e9f7fd2bb45675fc99 100644
|
| --- a/ppapi/thunk/ppb_url_loader_thunk.cc
|
| +++ b/ppapi/thunk/ppb_url_loader_thunk.cc
|
| @@ -90,6 +90,17 @@ int32_t ReadResponseBody(PP_Resource loader,
|
| enter.callback()));
|
| }
|
|
|
| +int32_t ReadResponseBodyToArray(PP_Resource loader,
|
| + int32_t max_read_length,
|
| + PP_ArrayOutput* buffer,
|
| + PP_CompletionCallback callback) {
|
| + EnterURLLoader enter(loader, callback, true);
|
| + if (enter.failed())
|
| + return enter.retval();
|
| + return enter.SetResult(enter.object()->ReadResponseBodyToArray(
|
| + max_read_length, buffer, enter.callback()));
|
| +}
|
| +
|
| int32_t FinishStreamingToFile(PP_Resource loader,
|
| PP_CompletionCallback callback) {
|
| EnterURLLoader enter(loader, callback, true);
|
| @@ -118,7 +129,21 @@ void SetStatusCallback(PP_Resource loader,
|
| enter.object()->SetStatusCallback(cb);
|
| }
|
|
|
| -const PPB_URLLoader g_ppb_urlloader_thunk = {
|
| +const PPB_URLLoader_1_1 g_ppb_urlloader_thunk = {
|
| + &Create,
|
| + &IsURLLoader,
|
| + &Open,
|
| + &FollowRedirect,
|
| + &GetUploadProgress,
|
| + &GetDownloadProgress,
|
| + &GetResponseInfo,
|
| + &ReadResponseBody,
|
| + &FinishStreamingToFile,
|
| + &Close,
|
| + &ReadResponseBodyToArray
|
| +};
|
| +
|
| +const PPB_URLLoader_1_0 g_ppb_urlloader_thunk_1_0 = {
|
| &Create,
|
| &IsURLLoader,
|
| &Open,
|
| @@ -138,10 +163,14 @@ const PPB_URLLoaderTrusted g_ppb_urlloader_trusted_thunk = {
|
|
|
| } // namespace
|
|
|
| -const PPB_URLLoader_1_0* GetPPB_URLLoader_1_0_Thunk() {
|
| +const PPB_URLLoader_1_1* GetPPB_URLLoader_1_1_Thunk() {
|
| return &g_ppb_urlloader_thunk;
|
| }
|
|
|
| +const PPB_URLLoader_1_0* GetPPB_URLLoader_1_0_Thunk() {
|
| + return &g_ppb_urlloader_thunk_1_0;
|
| +}
|
| +
|
| const PPB_URLLoaderTrusted_0_3* GetPPB_URLLoaderTrusted_0_3_Thunk() {
|
| return &g_ppb_urlloader_trusted_thunk;
|
| }
|
|
|