| 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 // 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 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 // Cancels a request in the pending_requests_ list. | 54 // Cancels a request in the pending_requests_ list. |
| 55 void CancelPendingRequest(int routing_id, int request_id); | 55 void CancelPendingRequest(int routing_id, int request_id); |
| 56 | 56 |
| 57 IPC::Sender* message_sender() const { | 57 IPC::Sender* message_sender() const { |
| 58 return message_sender_; | 58 return message_sender_; |
| 59 } | 59 } |
| 60 | 60 |
| 61 // Toggles the is_deferred attribute for the specified request. | 61 // Toggles the is_deferred attribute for the specified request. |
| 62 void SetDefersLoading(int request_id, bool value); | 62 void SetDefersLoading(int request_id, bool value); |
| 63 | 63 |
| 64 // Indicates the priority of the specified request changed. |
| 65 void DidChangePriority(int routing_id, int request_id, |
| 66 net::RequestPriority new_priority); |
| 67 |
| 64 // This does not take ownership of the delegate. It is expected that the | 68 // This does not take ownership of the delegate. It is expected that the |
| 65 // delegate have a longer lifetime than the ResourceDispatcher. | 69 // delegate have a longer lifetime than the ResourceDispatcher. |
| 66 void set_delegate(ResourceDispatcherDelegate* delegate) { | 70 void set_delegate(ResourceDispatcherDelegate* delegate) { |
| 67 delegate_ = delegate; | 71 delegate_ = delegate; |
| 68 } | 72 } |
| 69 | 73 |
| 70 private: | 74 private: |
| 71 friend class ResourceDispatcherTest; | 75 friend class ResourceDispatcherTest; |
| 72 | 76 |
| 73 typedef std::deque<IPC::Message*> MessageQueue; | 77 typedef std::deque<IPC::Message*> MessageQueue; |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; | 179 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; |
| 176 | 180 |
| 177 ResourceDispatcherDelegate* delegate_; | 181 ResourceDispatcherDelegate* delegate_; |
| 178 | 182 |
| 179 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 183 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
| 180 }; | 184 }; |
| 181 | 185 |
| 182 } // namespace content | 186 } // namespace content |
| 183 | 187 |
| 184 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ | 188 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ |
| OLD | NEW |