| Index: content/child/resource_dispatcher.h
|
| diff --git a/content/child/resource_dispatcher.h b/content/child/resource_dispatcher.h
|
| index 9b07c8265a7b7c369fe5a27f65dca4723a196b05..df42bd76ec43d734ce6f21341bb92b9531dd2fa6 100644
|
| --- a/content/child/resource_dispatcher.h
|
| +++ b/content/child/resource_dispatcher.h
|
| @@ -25,6 +25,8 @@
|
| #include "content/public/common/resource_type.h"
|
| #include "ipc/ipc_listener.h"
|
| #include "ipc/ipc_sender.h"
|
| +#include "mojo/public/cpp/system/data_pipe.h"
|
| +#include "mojo/public/cpp/system/watcher.h"
|
| #include "net/base/request_priority.h"
|
| #include "url/gurl.h"
|
|
|
| @@ -74,9 +76,12 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener {
|
| // Call this method to initiate the request. If this method succeeds, then
|
| // the peer's methods will be called asynchronously to report various events.
|
| // Returns the request id.
|
| - virtual int StartAsync(const RequestInfo& request_info,
|
| - ResourceRequestBody* request_body,
|
| - scoped_ptr<RequestPeer> peer);
|
| + virtual int StartAsync(
|
| + const RequestInfo& request_info,
|
| + ResourceRequestBody* request_body,
|
| + scoped_ptr<RequestPeer> peer,
|
| + mojo::ScopedDataPipeConsumerHandle mojo_data_pipe_handle,
|
| + int browser_request_id);
|
|
|
| // Removes a request from the |pending_requests_| list, returning true if the
|
| // request was found and removed.
|
| @@ -157,6 +162,10 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener {
|
| scoped_refptr<SharedMemoryReceivedDataFactory> received_data_factory;
|
| scoped_ptr<SiteIsolationResponseMetaData> site_isolation_metadata;
|
| int buffer_size;
|
| +
|
| + mojo::ScopedDataPipeConsumerHandle mojo_data_pipe_handle;
|
| + mojo::Watcher mojo_watcher;
|
| + uint32_t mojo_total_bytes;
|
| };
|
| using PendingRequestMap = std::map<int, scoped_ptr<PendingRequestInfo>>;
|
|
|
| @@ -197,6 +206,13 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener {
|
| // again in the deferred state. This method may mutate |pending_requests_|.
|
| void FlushDeferredMessages(int request_id);
|
|
|
| + // PlzNavigate: Mojo data streaming methods
|
| + void WaitForMojoData(int request_id, PendingRequestInfo* request_info);
|
| + void ReceivedMojoData(int request_id, MojoResult);
|
| + void AcceptMojoMessage(PendingRequestInfo* request_info,
|
| + const void* buffer,
|
| + uint32_t num_bytes);
|
| +
|
| void ToResourceResponseInfo(const PendingRequestInfo& request_info,
|
| const ResourceResponseHead& browser_info,
|
| ResourceResponseInfo* renderer_info) const;
|
|
|