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

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: Created 4 years, 10 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 14 matching lines...) Expand all
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(const scoped_refptr<ResourceResponse>& response,
48 scoped_ptr<StreamHandle> body); 49 scoped_ptr<StreamHandle> body,
50 mojo::ScopedDataPipeConsumerHandle data_consumer_ha ndle);
49 51
50 // Notifies the delegate the request failed to return a response. 52 // Notifies the delegate the request failed to return a response.
51 void NotifyRequestFailed(bool in_cache, int net_error); 53 void NotifyRequestFailed(bool in_cache, int net_error);
52 54
53 // Notifies the delegate the begin navigation request was handled and a 55 // Notifies the delegate the begin navigation request was handled and a
54 // potential first network request is about to be made. 56 // potential first network request is about to be made.
55 void NotifyRequestStarted(base::TimeTicks timestamp); 57 void NotifyRequestStarted(base::TimeTicks timestamp);
56 58
57 NavigationURLLoaderDelegate* delegate_; 59 NavigationURLLoaderDelegate* delegate_;
58 60
59 // |core_| is deleted on the IO thread in a subsequent task when the 61 // |core_| is deleted on the IO thread in a subsequent task when the
60 // NavigationURLLoaderImpl goes out of scope. 62 // NavigationURLLoaderImpl goes out of scope.
61 NavigationURLLoaderImplCore* core_; 63 NavigationURLLoaderImplCore* core_;
62 64
63 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_; 65 base::WeakPtrFactory<NavigationURLLoaderImpl> weak_factory_;
64 66
65 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl); 67 DISALLOW_COPY_AND_ASSIGN(NavigationURLLoaderImpl);
66 }; 68 };
67 69
68 } // namespace content 70 } // namespace content
69 71
70 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_ 72 #endif // CONTENT_BROWSER_LOADER_NAVIGATION_URL_LOADER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698