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

Unified Diff: content/child/resource_dispatcher.h

Issue 1693563002: PROTOTYPE: PlzNavigate: use a Mojo data pipe to stream navigation data to the renderer. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Browser sends URLRequest id to the renderer and renderer uses intermediary buffer for data: none he… Created 4 years, 9 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
« no previous file with comments | « content/child/request_info.h ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « content/child/request_info.h ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698