Chromium Code Reviews| 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 |
| 11 #include <deque> | 11 #include <deque> |
| 12 #include <string> | 12 #include <string> |
| 13 | 13 |
| 14 #include "base/hash_tables.h" | 14 #include "base/hash_tables.h" |
| 15 #include "base/memory/linked_ptr.h" | 15 #include "base/memory/linked_ptr.h" |
| 16 #include "base/memory/weak_ptr.h" | |
| 16 #include "base/shared_memory.h" | 17 #include "base/shared_memory.h" |
| 17 #include "base/task.h" | |
| 18 #include "content/common/content_export.h" | 18 #include "content/common/content_export.h" |
| 19 #include "ipc/ipc_channel.h" | 19 #include "ipc/ipc_channel.h" |
| 20 #include "webkit/glue/resource_loader_bridge.h" | 20 #include "webkit/glue/resource_loader_bridge.h" |
| 21 | 21 |
| 22 struct ResourceResponseHead; | 22 struct ResourceResponseHead; |
| 23 | 23 |
| 24 namespace content { | 24 namespace content { |
| 25 class ResourceDispatcherDelegate; | 25 class ResourceDispatcherDelegate; |
| 26 } | 26 } |
| 27 | 27 |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 147 // Iterate through a message queue and clean up the messages by calling | 147 // Iterate through a message queue and clean up the messages by calling |
| 148 // ReleaseResourcesInDataMessage and removing them from the queue. Intended | 148 // ReleaseResourcesInDataMessage and removing them from the queue. Intended |
| 149 // for use on deferred message queues that are no longer needed. | 149 // for use on deferred message queues that are no longer needed. |
| 150 static void ReleaseResourcesInMessageQueue(MessageQueue* queue); | 150 static void ReleaseResourcesInMessageQueue(MessageQueue* queue); |
| 151 | 151 |
| 152 IPC::Message::Sender* message_sender_; | 152 IPC::Message::Sender* message_sender_; |
| 153 | 153 |
| 154 // All pending requests issued to the host | 154 // All pending requests issued to the host |
| 155 PendingRequestList pending_requests_; | 155 PendingRequestList pending_requests_; |
| 156 | 156 |
| 157 ScopedRunnableMethodFactory<ResourceDispatcher> method_factory_; | 157 base::WeakPtrFactory<ResourceDispatcher> method_factory_; |
|
James Hawkins
2011/11/14 17:57:06
weak_factory_
dcheng
2011/11/14 20:47:49
Done.
| |
| 158 | 158 |
| 159 content::ResourceDispatcherDelegate* delegate_; | 159 content::ResourceDispatcherDelegate* delegate_; |
| 160 | 160 |
| 161 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 161 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
| 162 }; | 162 }; |
| 163 | 163 |
| 164 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ | 164 #endif // CONTENT_COMMON_RESOURCE_DISPATCHER_H_ |
| OLD | NEW |