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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 // ResourceLoaderBridge implementation ---------------------------------------- | 52 // ResourceLoaderBridge implementation ---------------------------------------- |
53 | 53 |
54 class IPCResourceLoaderBridge : public ResourceLoaderBridge { | 54 class IPCResourceLoaderBridge : public ResourceLoaderBridge { |
55 public: | 55 public: |
56 IPCResourceLoaderBridge(ResourceDispatcher* dispatcher, | 56 IPCResourceLoaderBridge(ResourceDispatcher* dispatcher, |
57 const ResourceLoaderBridge::RequestInfo& request_info); | 57 const ResourceLoaderBridge::RequestInfo& request_info); |
58 virtual ~IPCResourceLoaderBridge(); | 58 virtual ~IPCResourceLoaderBridge(); |
59 | 59 |
60 // ResourceLoaderBridge | 60 // ResourceLoaderBridge |
61 virtual void SetRequestBody(ResourceRequestBody* request_body); | 61 virtual void SetRequestBody(ResourceRequestBody* request_body) OVERRIDE; |
62 virtual bool Start(Peer* peer); | 62 virtual bool Start(Peer* peer) OVERRIDE; |
63 virtual void Cancel(); | 63 virtual void Cancel() OVERRIDE; |
64 virtual void SetDefersLoading(bool value); | 64 virtual void SetDefersLoading(bool value) OVERRIDE; |
65 virtual void SyncLoad(SyncLoadResponse* response); | 65 virtual void SyncLoad(SyncLoadResponse* response) OVERRIDE; |
66 | 66 |
67 private: | 67 private: |
68 ResourceLoaderBridge::Peer* peer_; | 68 ResourceLoaderBridge::Peer* peer_; |
69 | 69 |
70 // The resource dispatcher for this loader. The bridge doesn't own it, but | 70 // The resource dispatcher for this loader. The bridge doesn't own it, but |
71 // it's guaranteed to outlive the bridge. | 71 // it's guaranteed to outlive the bridge. |
72 ResourceDispatcher* dispatcher_; | 72 ResourceDispatcher* dispatcher_; |
73 | 73 |
74 // The request to send, created on initialization for modification and | 74 // The request to send, created on initialization for modification and |
75 // appending data. | 75 // appending data. |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { | 726 void ResourceDispatcher::ReleaseResourcesInMessageQueue(MessageQueue* queue) { |
727 while (!queue->empty()) { | 727 while (!queue->empty()) { |
728 IPC::Message* message = queue->front(); | 728 IPC::Message* message = queue->front(); |
729 ReleaseResourcesInDataMessage(*message); | 729 ReleaseResourcesInDataMessage(*message); |
730 queue->pop_front(); | 730 queue->pop_front(); |
731 delete message; | 731 delete message; |
732 } | 732 } |
733 } | 733 } |
734 | 734 |
735 } // namespace content | 735 } // namespace content |
OLD | NEW |