| 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/child/resource_dispatcher.h" | 7 #include "content/child/resource_dispatcher.h" |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 91 |
| 92 void OnReceiveResponse(const ResourceResponseHead& response_head) override { | 92 void OnReceiveResponse(const ResourceResponseHead& response_head) override { |
| 93 resource_dispatcher_->OnMessageReceived( | 93 resource_dispatcher_->OnMessageReceived( |
| 94 ResourceMsg_ReceivedResponse(request_id_, response_head)); | 94 ResourceMsg_ReceivedResponse(request_id_, response_head)); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void OnStartLoadingResponseBody( | 97 void OnStartLoadingResponseBody( |
| 98 mojo::ScopedDataPipeConsumerHandle body) override { | 98 mojo::ScopedDataPipeConsumerHandle body) override { |
| 99 DCHECK(!body_consumer_); | 99 DCHECK(!body_consumer_); |
| 100 body_consumer_ = new URLResponseBodyConsumer( | 100 body_consumer_ = new URLResponseBodyConsumer( |
| 101 request_id_, resource_dispatcher_, std::move(body), task_runner_.get()); | 101 request_id_, resource_dispatcher_, std::move(body), task_runner_); |
| 102 } | 102 } |
| 103 | 103 |
| 104 void OnComplete(const ResourceRequestCompletionStatus& status) override { | 104 void OnComplete(const ResourceRequestCompletionStatus& status) override { |
| 105 body_consumer_->OnComplete(status); | 105 body_consumer_->OnComplete(status); |
| 106 } | 106 } |
| 107 | 107 |
| 108 mojom::URLLoaderClientPtr CreateInterfacePtrAndBind() { | 108 mojom::URLLoaderClientPtr CreateInterfacePtrAndBind() { |
| 109 return binding_.CreateInterfacePtrAndBind(); | 109 return binding_.CreateInterfacePtrAndBind(); |
| 110 } | 110 } |
| 111 | 111 |
| (...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 *frame_origin = extra_data->frame_origin(); | 875 *frame_origin = extra_data->frame_origin(); |
| 876 return request; | 876 return request; |
| 877 } | 877 } |
| 878 | 878 |
| 879 void ResourceDispatcher::SetResourceSchedulingFilter( | 879 void ResourceDispatcher::SetResourceSchedulingFilter( |
| 880 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { | 880 scoped_refptr<ResourceSchedulingFilter> resource_scheduling_filter) { |
| 881 resource_scheduling_filter_ = resource_scheduling_filter; | 881 resource_scheduling_filter_ = resource_scheduling_filter; |
| 882 } | 882 } |
| 883 | 883 |
| 884 } // namespace content | 884 } // namespace content |
| OLD | NEW |