Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "content/child/npapi/plugin_url_fetcher.h" | 5 #include "content/child/npapi/plugin_url_fetcher.h" |
| 6 | 6 |
| 7 #include "content/child/child_thread.h" | 7 #include "content/child/child_thread.h" |
| 8 #include "content/child/npapi/webplugin.h" | 8 #include "content/child/npapi/webplugin.h" |
| 9 #include "content/child/npapi/plugin_host.h" | 9 #include "content/child/npapi/plugin_host.h" |
| 10 #include "content/child/npapi/plugin_instance.h" | 10 #include "content/child/npapi/plugin_instance.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 138 | 138 |
| 139 PluginURLFetcher::~PluginURLFetcher() { | 139 PluginURLFetcher::~PluginURLFetcher() { |
| 140 } | 140 } |
| 141 | 141 |
| 142 void PluginURLFetcher::Cancel() { | 142 void PluginURLFetcher::Cancel() { |
| 143 bridge_->Cancel(); | 143 bridge_->Cancel(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 void PluginURLFetcher::URLRedirectResponse(bool allow) { | 146 void PluginURLFetcher::URLRedirectResponse(bool allow) { |
| 147 if (allow) { | 147 if (allow) { |
| 148 bridge_->SetDefersLoading(true); | 148 bridge_->SetDefersLoading(false); |
|
scottmg
2013/11/07 04:48:55
this is the response to OnReceivedRedirect?
jam
2013/11/07 04:58:19
this is called by the plugin after we hit a redire
| |
| 149 } else { | 149 } else { |
| 150 bridge_->Cancel(); | 150 bridge_->Cancel(); |
| 151 plugin_stream_->DidFail(resource_id_); // That will delete |this|. | 151 plugin_stream_->DidFail(resource_id_); // That will delete |this|. |
| 152 } | 152 } |
| 153 } | 153 } |
| 154 | 154 |
| 155 void PluginURLFetcher::OnUploadProgress(uint64 position, uint64 size) { | 155 void PluginURLFetcher::OnUploadProgress(uint64 position, uint64 size) { |
| 156 } | 156 } |
| 157 | 157 |
| 158 bool PluginURLFetcher::OnReceivedRedirect( | 158 bool PluginURLFetcher::OnReceivedRedirect( |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 317 } | 317 } |
| 318 | 318 |
| 319 if (error_code == net::OK) { | 319 if (error_code == net::OK) { |
| 320 plugin_stream_->DidFinishLoading(resource_id_); | 320 plugin_stream_->DidFinishLoading(resource_id_); |
| 321 } else { | 321 } else { |
| 322 plugin_stream_->DidFail(resource_id_); | 322 plugin_stream_->DidFail(resource_id_); |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 | 325 |
| 326 } // namespace content | 326 } // namespace content |
| OLD | NEW |