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 #include "content/common/resource_dispatcher.h" | 7 #include "content/common/resource_dispatcher.h" |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 response->load_timing = result.load_timing; | 257 response->load_timing = result.load_timing; |
258 response->devtools_info = result.devtools_info; | 258 response->devtools_info = result.devtools_info; |
259 response->data.swap(result.data); | 259 response->data.swap(result.data); |
260 response->download_file_path = result.download_file_path; | 260 response->download_file_path = result.download_file_path; |
261 } | 261 } |
262 | 262 |
263 } // namespace webkit_glue | 263 } // namespace webkit_glue |
264 | 264 |
265 // ResourceDispatcher --------------------------------------------------------- | 265 // ResourceDispatcher --------------------------------------------------------- |
266 | 266 |
267 ResourceDispatcher::ResourceDispatcher(IPC::Message::Sender* sender) | 267 ResourceDispatcher::ResourceDispatcher(IPC::Sender* sender) |
268 : message_sender_(sender), | 268 : message_sender_(sender), |
269 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), | 269 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)), |
270 delegate_(NULL) { | 270 delegate_(NULL) { |
271 } | 271 } |
272 | 272 |
273 ResourceDispatcher::~ResourceDispatcher() { | 273 ResourceDispatcher::~ResourceDispatcher() { |
274 } | 274 } |
275 | 275 |
276 // ResourceDispatcher implementation ------------------------------------------ | 276 // ResourceDispatcher implementation ------------------------------------------ |
277 | 277 |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
687 | 687 |
688 // static | 688 // static |
689 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { | 689 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { |
690 while (!queue->empty()) { | 690 while (!queue->empty()) { |
691 IPC::Message* message = queue->front(); | 691 IPC::Message* message = queue->front(); |
692 ReleaseResourcesInDataMessage(*message); | 692 ReleaseResourcesInDataMessage(*message); |
693 queue->pop_front(); | 693 queue->pop_front(); |
694 delete message; | 694 delete message; |
695 } | 695 } |
696 } | 696 } |
OLD | NEW |