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 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading | 5 // See http://dev.chromium.org/developers/design-documents/multi-process-resourc
e-loading |
6 | 6 |
7 #ifndef CONTENT_COMMON_RESOURCE_DISPATCHER_H_ | 7 #ifndef CONTENT_COMMON_RESOURCE_DISPATCHER_H_ |
8 #define CONTENT_COMMON_RESOURCE_DISPATCHER_H_ | 8 #define CONTENT_COMMON_RESOURCE_DISPATCHER_H_ |
9 #pragma once | 9 #pragma once |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 ResourceType::Type resource_type, | 37 ResourceType::Type resource_type, |
38 const net::URLRequestStatus& status) = 0; | 38 const net::URLRequestStatus& status) = 0; |
39 | 39 |
40 virtual webkit_glue::ResourceLoaderBridge::Peer* OnReceivedResponse( | 40 virtual webkit_glue::ResourceLoaderBridge::Peer* OnReceivedResponse( |
41 webkit_glue::ResourceLoaderBridge::Peer* current_peer, | 41 webkit_glue::ResourceLoaderBridge::Peer* current_peer, |
42 const std::string& mime_type, | 42 const std::string& mime_type, |
43 const GURL& url) = 0; | 43 const GURL& url) = 0; |
44 }; | 44 }; |
45 | 45 |
46 explicit ResourceDispatcher(IPC::Message::Sender* sender); | 46 explicit ResourceDispatcher(IPC::Message::Sender* sender); |
47 ~ResourceDispatcher(); | 47 virtual ~ResourceDispatcher(); |
48 | 48 |
49 // IPC::Channel::Listener implementation. | 49 // IPC::Channel::Listener implementation. |
50 virtual bool OnMessageReceived(const IPC::Message& message); | 50 virtual bool OnMessageReceived(const IPC::Message& message); |
51 | 51 |
52 // Creates a ResourceLoaderBridge for this type of dispatcher, this is so | 52 // Creates a ResourceLoaderBridge for this type of dispatcher, this is so |
53 // this can be tested regardless of the ResourceLoaderBridge::Create | 53 // this can be tested regardless of the ResourceLoaderBridge::Create |
54 // implementation. | 54 // implementation. |
55 webkit_glue::ResourceLoaderBridge* CreateBridge( | 55 webkit_glue::ResourceLoaderBridge* CreateBridge( |
56 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info); | 56 const webkit_glue::ResourceLoaderBridge::RequestInfo& request_info); |
57 | 57 |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 PendingRequestList pending_requests_; | 165 PendingRequestList pending_requests_; |
166 | 166 |
167 ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_; | 167 ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_; |
168 | 168 |
169 scoped_ptr<Observer> observer_; | 169 scoped_ptr<Observer> observer_; |
170 | 170 |
171 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 171 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
172 }; | 172 }; |
173 | 173 |
174 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ | 174 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ |
OLD | NEW |