OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. | 5 // An implementation of WebURLLoader in terms of ResourceLoaderBridge. |
6 | 6 |
7 #include "webkit/glue/weburlloader_impl.h" | 7 #include "webkit/glue/weburlloader_impl.h" |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 } | 263 } |
264 | 264 |
265 void WebURLLoaderImpl::Context::Cancel() { | 265 void WebURLLoaderImpl::Context::Cancel() { |
266 // The bridge will still send OnCompletedRequest, which will Release() us, so | 266 // The bridge will still send OnCompletedRequest, which will Release() us, so |
267 // we don't do that here. | 267 // we don't do that here. |
268 if (bridge_.get()) | 268 if (bridge_.get()) |
269 bridge_->Cancel(); | 269 bridge_->Cancel(); |
270 | 270 |
271 // Ensure that we do not notify the multipart delegate anymore as it has | 271 // Ensure that we do not notify the multipart delegate anymore as it has |
272 // its own pointer to the client. | 272 // its own pointer to the client. |
273 multipart_delegate_.reset(); | 273 if (multipart_delegate_.get()) |
| 274 multipart_delegate_->Cancel(); |
274 | 275 |
275 // Do not make any further calls to the client. | 276 // Do not make any further calls to the client. |
276 client_ = NULL; | 277 client_ = NULL; |
277 loader_ = NULL; | 278 loader_ = NULL; |
278 } | 279 } |
279 | 280 |
280 void WebURLLoaderImpl::Context::SetDefersLoading(bool value) { | 281 void WebURLLoaderImpl::Context::SetDefersLoading(bool value) { |
281 if (bridge_.get()) | 282 if (bridge_.get()) |
282 bridge_->SetDefersLoading(value); | 283 bridge_->SetDefersLoading(value); |
283 } | 284 } |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
650 | 651 |
651 void WebURLLoaderImpl::cancel() { | 652 void WebURLLoaderImpl::cancel() { |
652 context_->Cancel(); | 653 context_->Cancel(); |
653 } | 654 } |
654 | 655 |
655 void WebURLLoaderImpl::setDefersLoading(bool value) { | 656 void WebURLLoaderImpl::setDefersLoading(bool value) { |
656 context_->SetDefersLoading(value); | 657 context_->SetDefersLoading(value); |
657 } | 658 } |
658 | 659 |
659 } // namespace webkit_glue | 660 } // namespace webkit_glue |
OLD | NEW |