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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 explicit ResourceDispatcher(IPC::Message::Sender* sender); | 46 explicit ResourceDispatcher(IPC::Message::Sender* sender); |
47 ~ResourceDispatcher(); | 47 ~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 int host_renderer_id, | |
58 int host_render_view_id); | |
59 | 57 |
60 // Adds a request from the pending_requests_ list, returning the new | 58 // Adds a request from the pending_requests_ list, returning the new |
61 // requests' ID | 59 // requests' ID |
62 int AddPendingRequest(webkit_glue::ResourceLoaderBridge::Peer* callback, | 60 int AddPendingRequest(webkit_glue::ResourceLoaderBridge::Peer* callback, |
63 ResourceType::Type resource_type, | 61 ResourceType::Type resource_type, |
64 const GURL& request_url); | 62 const GURL& request_url); |
65 | 63 |
66 // Removes a request from the pending_requests_ list, returning true if the | 64 // Removes a request from the pending_requests_ list, returning true if the |
67 // request was found and removed. | 65 // request was found and removed. |
68 bool RemovePendingRequest(int request_id); | 66 bool RemovePendingRequest(int request_id); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 PendingRequestList pending_requests_; | 164 PendingRequestList pending_requests_; |
167 | 165 |
168 ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_; | 166 ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_; |
169 | 167 |
170 scoped_ptr<Observer> observer_; | 168 scoped_ptr<Observer> observer_; |
171 | 169 |
172 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 170 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
173 }; | 171 }; |
174 | 172 |
175 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ | 173 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ |
OLD | NEW |