OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_PUBLIC_CHILD_RESOURCE_DISPATCHER_DELEGATE_H_ | 5 #ifndef CONTENT_PUBLIC_CHILD_RESOURCE_DISPATCHER_DELEGATE_H_ |
6 #define CONTENT_PUBLIC_CHILD_RESOURCE_DISPATCHER_DELEGATE_H_ | 6 #define CONTENT_PUBLIC_CHILD_RESOURCE_DISPATCHER_DELEGATE_H_ |
7 | 7 |
| 8 #include <string> |
| 9 |
8 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
9 #include "webkit/child/resource_loader_bridge.h" | 11 #include "webkit/common/resource_type.h" |
| 12 |
| 13 class GURL; |
10 | 14 |
11 namespace content { | 15 namespace content { |
12 | 16 |
| 17 class RequestPeer; |
| 18 |
13 // Interface that allows observing request events and optionally replacing the | 19 // Interface that allows observing request events and optionally replacing the |
14 // peer. | 20 // peer. |
15 class CONTENT_EXPORT ResourceDispatcherDelegate { | 21 class CONTENT_EXPORT ResourceDispatcherDelegate { |
16 public: | 22 public: |
17 virtual ~ResourceDispatcherDelegate() {} | 23 virtual ~ResourceDispatcherDelegate() {} |
18 | 24 |
19 virtual webkit_glue::ResourceLoaderBridge::Peer* OnRequestComplete( | 25 virtual RequestPeer* OnRequestComplete( |
20 webkit_glue::ResourceLoaderBridge::Peer* current_peer, | 26 RequestPeer* current_peer, |
21 ResourceType::Type resource_type, | 27 ResourceType::Type resource_type, |
22 int error_code) = 0; | 28 int error_code) = 0; |
23 | 29 |
24 virtual webkit_glue::ResourceLoaderBridge::Peer* OnReceivedResponse( | 30 virtual RequestPeer* OnReceivedResponse( |
25 webkit_glue::ResourceLoaderBridge::Peer* current_peer, | 31 RequestPeer* current_peer, |
26 const std::string& mime_type, | 32 const std::string& mime_type, |
27 const GURL& url) = 0; | 33 const GURL& url) = 0; |
28 }; | 34 }; |
29 | 35 |
30 } // namespace content | 36 } // namespace content |
31 | 37 |
32 #endif // CONTENT_PUBLIC_CHILD_RESOURCE_DISPATCHER_DELEGATE_H_ | 38 #endif // CONTENT_PUBLIC_CHILD_RESOURCE_DISPATCHER_DELEGATE_H_ |
OLD | NEW |