| Index: native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.h
|
| diff --git a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.h b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.h
|
| index 5f861d1c6f14ef7dd380bbb67cd2b048ffef4a53..3bc86802134945c3d33990f3e90aa1d470fbce06 100644
|
| --- a/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.h
|
| +++ b/native_client_sdk/src/tests/nacl_io_test/fake_ppapi/fake_pepper_interface_url_loader.h
|
| @@ -10,6 +10,7 @@
|
| #include <vector>
|
|
|
| #include "fake_ppapi/fake_core_interface.h"
|
| +#include "fake_ppapi/fake_file_ref_interface.h"
|
| #include "fake_ppapi/fake_var_interface.h"
|
| #include "fake_ppapi/fake_var_manager.h"
|
| #include "nacl_io/pepper_interface_dummy.h"
|
| @@ -48,8 +49,7 @@ class FakeURLLoaderServer {
|
| bool SetBlobEntity(const std::string& url,
|
| const std::string& body,
|
| FakeURLLoaderEntity** out_entity);
|
| - bool AddError(const std::string& url,
|
| - int http_status_code);
|
| + bool AddError(const std::string& url, int http_status_code);
|
| FakeURLLoaderEntity* GetEntity(const std::string& url);
|
| // Returns 0 if the url is not in the error map.
|
| int GetError(const std::string& url);
|
| @@ -100,11 +100,15 @@ class FakeURLLoaderInterface : public nacl_io::URLLoaderInterface {
|
| void* buffer,
|
| int32_t bytes_to_read,
|
| PP_CompletionCallback callback);
|
| + virtual int32_t FinishStreamingToFile(PP_Resource loader,
|
| + PP_CompletionCallback callback);
|
| +
|
| virtual void Close(PP_Resource loader);
|
|
|
| - private:
|
| + protected:
|
| FakeCoreInterface* core_interface_; // Weak reference.
|
|
|
| + private:
|
| DISALLOW_COPY_AND_ASSIGN(FakeURLLoaderInterface);
|
| };
|
|
|
| @@ -117,10 +121,13 @@ class FakeURLRequestInfoInterface : public nacl_io::URLRequestInfoInterface {
|
| virtual PP_Bool SetProperty(PP_Resource request,
|
| PP_URLRequestProperty property,
|
| PP_Var value);
|
| + virtual PP_Bool AppendDataToBody(PP_Resource request,
|
| + const void* data,
|
| + uint32_t len);
|
|
|
| private:
|
| FakeCoreInterface* core_interface_; // Weak reference.
|
| - FakeVarInterface* var_interface_; // Weak reference.
|
| + FakeVarInterface* var_interface_; // Weak reference.
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FakeURLRequestInfoInterface);
|
| };
|
| @@ -128,14 +135,19 @@ class FakeURLRequestInfoInterface : public nacl_io::URLRequestInfoInterface {
|
| class FakeURLResponseInfoInterface : public nacl_io::URLResponseInfoInterface {
|
| public:
|
| FakeURLResponseInfoInterface(FakeCoreInterface* core_interface,
|
| - FakeVarInterface* var_interface);
|
| + FakeVarInterface* var_interface,
|
| + FakeFileRefInterface* file_ref_interface);
|
| + ~FakeURLResponseInfoInterface();
|
|
|
| virtual PP_Var GetProperty(PP_Resource response,
|
| PP_URLResponseProperty property);
|
| + virtual PP_Resource GetBodyAsFileRef(PP_Resource response);
|
|
|
| private:
|
| FakeCoreInterface* core_interface_; // Weak reference.
|
| - FakeVarInterface* var_interface_; // Weak reference.
|
| + FakeVarInterface* var_interface_; // Weak reference.
|
| + FakeFileRefInterface* file_ref_interface_;
|
| + PP_Resource filesystem_resource_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(FakeURLResponseInfoInterface);
|
| };
|
| @@ -149,6 +161,7 @@ class FakePepperInterfaceURLLoader : public nacl_io::PepperInterfaceDummy {
|
| virtual PP_Instance GetInstance() { return instance_; }
|
| virtual nacl_io::CoreInterface* GetCoreInterface();
|
| virtual nacl_io::VarInterface* GetVarInterface();
|
| + virtual nacl_io::FileRefInterface* GetFileRefInterface();
|
| virtual nacl_io::URLLoaderInterface* GetURLLoaderInterface();
|
| virtual nacl_io::URLRequestInfoInterface* GetURLRequestInfoInterface();
|
| virtual nacl_io::URLResponseInfoInterface* GetURLResponseInfoInterface();
|
| @@ -163,6 +176,7 @@ class FakePepperInterfaceURLLoader : public nacl_io::PepperInterfaceDummy {
|
| FakeVarInterface var_interface_;
|
| FakeVarManager var_manager_;
|
| FakeURLLoaderServer server_template_;
|
| + FakeFileRefInterface file_ref_interface_;
|
| FakeURLLoaderInterface url_loader_interface_;
|
| FakeURLRequestInfoInterface url_request_info_interface_;
|
| FakeURLResponseInfoInterface url_response_info_interface_;
|
|
|