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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 // This class serves as a communication interface between the | 45 // This class serves as a communication interface between the |
46 // ResourceDispatcherHost in the browser process and the ResourceLoaderBridge in | 46 // ResourceDispatcherHost in the browser process and the ResourceLoaderBridge in |
47 // the child process. It can be used from any child process. | 47 // the child process. It can be used from any child process. |
48 class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener { | 48 class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener { |
49 public: | 49 public: |
50 explicit ResourceDispatcher(IPC::Sender* sender); | 50 explicit ResourceDispatcher(IPC::Sender* sender); |
51 virtual ~ResourceDispatcher(); | 51 virtual ~ResourceDispatcher(); |
52 | 52 |
53 // IPC::Listener implementation. | 53 // IPC::Listener implementation. |
54 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 54 virtual bool OnMessageReceived(const IPC::Message& message) override; |
55 | 55 |
56 // Creates a ResourceLoaderBridge for this type of dispatcher, this is so | 56 // Creates a ResourceLoaderBridge for this type of dispatcher, this is so |
57 // this can be tested regardless of the ResourceLoaderBridge::Create | 57 // this can be tested regardless of the ResourceLoaderBridge::Create |
58 // implementation. Virtual for tests. | 58 // implementation. Virtual for tests. |
59 virtual ResourceLoaderBridge* CreateBridge(const RequestInfo& request_info); | 59 virtual ResourceLoaderBridge* CreateBridge(const RequestInfo& request_info); |
60 | 60 |
61 // Adds a request from the |pending_requests_| list, returning the new | 61 // Adds a request from the |pending_requests_| list, returning the new |
62 // requests' ID. | 62 // requests' ID. |
63 int AddPendingRequest(RequestPeer* callback, | 63 int AddPendingRequest(RequestPeer* callback, |
64 ResourceType resource_type, | 64 ResourceType resource_type, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 base::TimeTicks io_timestamp_; | 216 base::TimeTicks io_timestamp_; |
217 | 217 |
218 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; | 218 base::WeakPtrFactory<ResourceDispatcher> weak_factory_; |
219 | 219 |
220 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); | 220 DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher); |
221 }; | 221 }; |
222 | 222 |
223 } // namespace content | 223 } // namespace content |
224 | 224 |
225 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ | 225 #endif // CONTENT_CHILD_RESOURCE_DISPATCHER_H_ |
OLD | NEW |