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

Side by Side Diff: content/child/web_url_loader_impl.h

Issue 2449933003: Use Associated interfaces for mojo-loading (Closed)
Patch Set: fix Created 4 years, 1 month 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_CHILD_WEB_URL_LOADER_IMPL_H_ 5 #ifndef CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_
6 #define CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ 6 #define CONTENT_CHILD_WEB_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 "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/common/url_loader_factory.mojom.h" 11 #include "content/common/url_loader_factory.mojom.h"
12 #include "content/public/common/resource_response.h" 12 #include "content/public/common/resource_response.h"
13 #include "net/url_request/redirect_info.h" 13 #include "net/url_request/redirect_info.h"
14 #include "third_party/WebKit/public/platform/WebURLLoader.h" 14 #include "third_party/WebKit/public/platform/WebURLLoader.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 namespace base { 17 namespace base {
18 18
19 class SingleThreadTaskRunner; 19 class SingleThreadTaskRunner;
20 20
21 } // namespace base 21 } // namespace base
22 22
23 namespace mojo {
24 class AssociatedGroup;
25 } // namespace mojo
26
23 namespace content { 27 namespace content {
24 28
25 class ResourceDispatcher; 29 class ResourceDispatcher;
26 struct ResourceResponseInfo; 30 struct ResourceResponseInfo;
27 31
28 // PlzNavigate: Used to override parameters of the navigation request. 32 // PlzNavigate: Used to override parameters of the navigation request.
29 struct CONTENT_EXPORT StreamOverrideParameters { 33 struct CONTENT_EXPORT StreamOverrideParameters {
30 public: 34 public:
31 StreamOverrideParameters(); 35 StreamOverrideParameters();
32 ~StreamOverrideParameters(); 36 ~StreamOverrideParameters();
33 // TODO(clamy): The browser should be made aware on destruction of this struct 37 // TODO(clamy): The browser should be made aware on destruction of this struct
34 // that it can release its associated stream handle. 38 // that it can release its associated stream handle.
35 GURL stream_url; 39 GURL stream_url;
36 ResourceResponseHead response; 40 ResourceResponseHead response;
37 std::vector<GURL> redirects; 41 std::vector<GURL> redirects;
38 std::vector<ResourceResponseInfo> redirect_responses; 42 std::vector<ResourceResponseInfo> redirect_responses;
39 }; 43 };
40 44
41 class CONTENT_EXPORT WebURLLoaderImpl 45 class CONTENT_EXPORT WebURLLoaderImpl
42 : public NON_EXPORTED_BASE(blink::WebURLLoader) { 46 : public NON_EXPORTED_BASE(blink::WebURLLoader) {
43 public: 47 public:
44 48
45 // Takes ownership of |web_task_runner|. 49 // Takes ownership of |web_task_runner|.
46 WebURLLoaderImpl(ResourceDispatcher* resource_dispatcher, 50 WebURLLoaderImpl(ResourceDispatcher* resource_dispatcher,
47 mojom::URLLoaderFactory* url_loader_factory); 51 mojom::URLLoaderFactory* url_loader_factory,
52 mojo::AssociatedGroup* associated_group);
48 ~WebURLLoaderImpl() override; 53 ~WebURLLoaderImpl() override;
49 54
50 static void PopulateURLResponse(const GURL& url, 55 static void PopulateURLResponse(const GURL& url,
51 const ResourceResponseInfo& info, 56 const ResourceResponseInfo& info,
52 blink::WebURLResponse* response, 57 blink::WebURLResponse* response,
53 bool report_security_info); 58 bool report_security_info);
54 static void PopulateURLRequestForRedirect( 59 static void PopulateURLRequestForRedirect(
55 const blink::WebURLRequest& request, 60 const blink::WebURLRequest& request,
56 const net::RedirectInfo& redirect_info, 61 const net::RedirectInfo& redirect_info,
57 blink::WebURLRequest::SkipServiceWorker skip_service_worker, 62 blink::WebURLRequest::SkipServiceWorker skip_service_worker,
(...skipping 18 matching lines...) Expand all
76 class Context; 81 class Context;
77 class RequestPeerImpl; 82 class RequestPeerImpl;
78 scoped_refptr<Context> context_; 83 scoped_refptr<Context> context_;
79 84
80 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl); 85 DISALLOW_COPY_AND_ASSIGN(WebURLLoaderImpl);
81 }; 86 };
82 87
83 } // namespace content 88 } // namespace content
84 89
85 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_ 90 #endif // CONTENT_CHILD_WEB_URL_LOADER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698