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

Side by Side Diff: content/browser/loader/navigation_url_loader_impl.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, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_
6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ 6 #define CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "content/browser/loader/navigation_url_loader.h" 13 #include "content/browser/loader/navigation_url_loader.h"
14 #include "mojo/public/cpp/system/data_pipe.h"
14 15
15 namespace net { 16 namespace net {
16 struct RedirectInfo; 17 struct RedirectInfo;
17 } 18 }
18 19
19 namespace content { 20 namespace content {
20 21
21 class NavigationURLLoaderImplCore; 22 class NavigationURLLoaderImplCore;
22 class ServiceWorkerNavigationHandle; 23 class ServiceWorkerNavigationHandle;
23 class StreamHandle; 24 class StreamHandle;
(...skipping 13 matching lines...) Expand all
37 void FollowRedirect() override; 38 void FollowRedirect() override;
38 39
39 private: 40 private:
40 friend class NavigationURLLoaderImplCore; 41 friend class NavigationURLLoaderImplCore;
41 42
42 // Notifies the delegate of a redirect. 43 // Notifies the delegate of a redirect.
43 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info, 44 void NotifyRequestRedirected(const net::RedirectInfo& redirect_info,
44 const scoped_refptr<ResourceResponse>& response); 45 const scoped_refptr<ResourceResponse>& response);
45 46
46 // Notifies the delegate that the response has started. 47 // Notifies the delegate that the response has started.
47 void NotifyResponseStarted(const scoped_refptr<ResourceResponse>& response, 48 void NotifyResponseStarted(
48 scoped_ptr<StreamHandle> body); 49 const scoped_refptr<ResourceResponse>& response,
50 mojo::ScopedDataPipeConsumerHandle data_consumer_handle,
51 int request_id);
49 52
50 // Notifies the delegate the request failed to return a response. 53 // Notifies the delegate the request failed to return a response.
51 void NotifyRequestFailed(bool in_cache, int net_error); 54 void NotifyRequestFailed(bool in_cache, int net_error);
52 55
53 // Notifies the delegate the begin navigation request was handled and a 56 // Notifies the delegate the begin navigation request was handled and a
54 // potential first network request is about to be made. 57 // potential first network request is about to be made.
55 void NotifyRequestStarted(base::TimeTicks timestamp); 58 void NotifyRequestStarted(base::TimeTicks timestamp);
56 59
57 NavigationURLLoaderDelegate* delegate_; 60 NavigationURLLoaderDelegate* delegate_;
58 61
59 // |core_| is deleted on the IO thread in a subsequent task when the 62 // |core_| is deleted on the IO thread in a subsequent task when the
60 // NavigationURLLoaderImpl goes out of scope. 63 // NavigationURLLoaderImpl goes out of scope.
61 NavigationURLLoaderImplCore* core_; 64 NavigationURLLoaderImplCore* core_;
62 65
63 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_; 66 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_;
64 67
65 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl); 68 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl);
66 }; 69 };
67 70
68 } // namespace content 71 } // namespace content
69 72
70 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ 73 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/loader/navigation_url_loader_delegate.h ('k') | content/browser/loader/navigation_url_loader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698