| 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_CHILD_RESOURCE_DISPATCHER_H_ | 7 #ifndef CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
| 8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 8 #define CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 int request_id, blink::WebThreadedDataReceiver* threaded_data_receiver); | 92 int request_id, blink::WebThreadedDataReceiver* threaded_data_receiver); |
| 93 | 93 |
| 94 // If we have a ThreadedDataProvider attached, an OnRequestComplete message | 94 // If we have a ThreadedDataProvider attached, an OnRequestComplete message |
| 95 // will get bounced via the background thread and then passed to this function | 95 // will get bounced via the background thread and then passed to this function |
| 96 // to resume processing. | 96 // to resume processing. |
| 97 void CompletedRequestAfterBackgroundThreadFlush( | 97 void CompletedRequestAfterBackgroundThreadFlush( |
| 98 int request_id, | 98 int request_id, |
| 99 const ResourceMsg_RequestCompleteData& request_complete_data, | 99 const ResourceMsg_RequestCompleteData& request_complete_data, |
| 100 const base::TimeTicks& renderer_completion_time); | 100 const base::TimeTicks& renderer_completion_time); |
| 101 | 101 |
| 102 void set_message_sender(IPC::Sender* sender) { | |
| 103 DCHECK(sender); | |
| 104 DCHECK(pending_requests_.empty()); | |
| 105 message_sender_ = sender; | |
| 106 } | |
| 107 | |
| 108 IPC::Sender* message_sender() const { return message_sender_; } | 102 IPC::Sender* message_sender() const { return message_sender_; } |
| 109 | 103 |
| 110 // This does not take ownership of the delegate. It is expected that the | 104 // This does not take ownership of the delegate. It is expected that the |
| 111 // delegate have a longer lifetime than the ResourceDispatcher. | 105 // delegate have a longer lifetime than the ResourceDispatcher. |
| 112 void set_delegate(ResourceDispatcherDelegate* delegate) { | 106 void set_delegate(ResourceDispatcherDelegate* delegate) { |
| 113 delegate_ = delegate; | 107 delegate_ = delegate; |
| 114 } | 108 } |
| 115 | 109 |
| 116 // Remembers IO thread timestamp for next resource message. | 110 // Remembers IO thread timestamp for next resource message. |
| 117 void set_io_timestamp(base::TimeTicks io_timestamp) { | 111 void set_io_timestamp(base::TimeTicks io_timestamp) { |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; | 234 scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_; |
| 241 | 235 |
| 242 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; | 236 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; |
| 243 | 237 |
| 244 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 238 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
| 245 }; | 239 }; |
| 246 | 240 |
| 247 } // namespace content | 241 } // namespace content |
| 248 | 242 |
| 249 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 243 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
| OLD | NEW |