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

Side by Side Diff: content/browser/loader/loader_delegate.h

Issue 2108643004: Remove use of WebContentsImpl from ResourceDispatcherHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@render-view-try-3
Patch Set: fix comment Created 4 years, 5 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_LOADER_DELEGATE_H_ 5 #ifndef CONTENT_BROWSER_LOADER_LOADER_DELEGATE_H_
6 #define CONTENT_BROWSER_LOADER_LOADER_DELEGATE_H_ 6 #define CONTENT_BROWSER_LOADER_LOADER_DELEGATE_H_
7 7
8 #include <inttypes.h> 8 #include <inttypes.h>
9 9
10 #include <memory>
11
12 #include "content/common/content_export.h"
13 #include "content/public/browser/resource_request_details.h"
10 #include "net/base/load_states.h" 14 #include "net/base/load_states.h"
11 15
12 class GURL; 16 class GURL;
13 17
14 namespace content { 18 namespace content {
15 19
16 // Delegate from loader to the rest of content. Lives on the IO thread. 20 // Delegate from loader to the rest of content. Should be interacted with on the
21 // IO thread.
17 // 22 //
18 // This is used for breaking dependencies between content at-large and 23 // This is used for breaking dependencies between content at-large and
19 // content/browser/loader which will eventually be moved to a separate 24 // content/browser/loader which will eventually be moved to a separate
20 // networking service. All methods in this interface should be asynchronous, 25 // networking service. All methods in this interface should be asynchronous,
21 // since eventually this will be a Mojo interface. See https://crbug.com/622050 26 // since eventually this will be a Mojo interface. See https://crbug.com/622050
22 // and https://crbug.com/598073. 27 // and https://crbug.com/598073.
23 class LoaderDelegate { 28 class CONTENT_EXPORT LoaderDelegate {
24 public: 29 public:
25 virtual ~LoaderDelegate() {} 30 virtual ~LoaderDelegate() {}
26 31
27 // Notification that the load state for the route identified by child_id and 32 // Notification that the load state for the route identified by child_id and
28 // route_id has changed. 33 // route_id has changed.
29 virtual void LoadStateChanged(int child_id, 34 virtual void LoadStateChanged(int child_id,
30 int route_id, 35 int route_id,
31 const GURL& url, 36 const GURL& url,
32 const net::LoadStateWithParam& load_state, 37 const net::LoadStateWithParam& load_state,
33 uint64_t upload_position, 38 uint64_t upload_position,
34 uint64_t upload_size) = 0; 39 uint64_t upload_size) = 0;
40
41 // Notification that a response has been received for a resource request.
42 virtual void DidGetResourceResponseStart(
43 int render_process_id,
44 int render_frame_host,
45 std::unique_ptr<ResourceRequestDetails> details) = 0;
46
47 // Notification that a redirect was received while requesting a resource.
48 virtual void DidGetRedirectForResourceRequest(
49 int render_process_id,
50 int render_frame_host,
51 std::unique_ptr<ResourceRedirectDetails> details) = 0;
35 }; 52 };
36 53
37 } // namespace content 54 } // namespace content
38 55
39 #endif // CONTENT_BROWSER_LOADER_LOADER_DELEGATE_H_ 56 #endif // CONTENT_BROWSER_LOADER_LOADER_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698