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