[refactor] More post-NSS WebCrypto cleanups (utility functions).
[chromium-blink-merge.git] / content / browser / loader / resource_loader_delegate.h
blob38c8a38bf7a8ab995ddd778b694b28d80703a183
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_BROWSER_LOADER_RESOURCE_LOADER_DELEGATE_H_
6 #define CONTENT_BROWSER_LOADER_RESOURCE_LOADER_DELEGATE_H_
8 #include "content/common/content_export.h"
10 namespace net {
11 class AuthChallengeInfo;
14 namespace content {
15 class ResourceDispatcherHostLoginDelegate;
16 class ResourceLoader;
18 class CONTENT_EXPORT ResourceLoaderDelegate {
19 public:
20 virtual ResourceDispatcherHostLoginDelegate* CreateLoginDelegate(
21 ResourceLoader* loader,
22 net::AuthChallengeInfo* auth_info) = 0;
24 virtual bool HandleExternalProtocol(ResourceLoader* loader,
25 const GURL& url) = 0;
27 virtual void DidStartRequest(ResourceLoader* loader) = 0;
28 virtual void DidReceiveRedirect(ResourceLoader* loader,
29 const GURL& new_url) = 0;
30 virtual void DidReceiveResponse(ResourceLoader* loader) = 0;
32 // This method informs the delegate that the loader is done, and the loader
33 // expects to be destroyed as a side-effect of this call.
34 virtual void DidFinishLoading(ResourceLoader* loader) = 0;
36 protected:
37 virtual ~ResourceLoaderDelegate() {}
40 } // namespace content
42 #endif // CONTENT_BROWSER_LOADER_RESOURCE_LOADER_DELEGATE_H_