Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: content/renderer/pepper/pepper_url_loader_host.cc

Issue 324883002: Merge 275861 "Revert 274770 "Ensure that in-process plugins can'..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2041/src/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/renderer/pepper/pepper_url_loader_host.h" 5 #include "content/renderer/pepper/pepper_url_loader_host.h"
6 6
7 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 7 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
8 #include "content/renderer/pepper/renderer_ppapi_host_impl.h" 8 #include "content/renderer/pepper/renderer_ppapi_host_impl.h"
9 #include "content/renderer/pepper/url_request_info_util.h" 9 #include "content/renderer/pepper/url_request_info_util.h"
10 #include "content/renderer/pepper/url_response_info_util.h" 10 #include "content/renderer/pepper/url_response_info_util.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 pending_replies_.push_back(message); 354 pending_replies_.push_back(message);
355 } else { 355 } else {
356 host()->SendUnsolicitedReply(pp_resource(), *message); 356 host()->SendUnsolicitedReply(pp_resource(), *message);
357 delete message; 357 delete message;
358 } 358 }
359 } 359 }
360 360
361 void PepperURLLoaderHost::Close() { 361 void PepperURLLoaderHost::Close() {
362 if (loader_.get()) 362 if (loader_.get())
363 loader_->cancel(); 363 loader_->cancel();
364 else if (main_document_loader_) { 364 else if (main_document_loader_)
365 blink::WebFrame* frame = GetFrame(); 365 GetFrame()->stopLoading();
366 if (frame)
367 frame->stopLoading();
368 }
369 } 366 }
370 367
371 blink::WebLocalFrame* PepperURLLoaderHost::GetFrame() { 368 blink::WebLocalFrame* PepperURLLoaderHost::GetFrame() {
372 PepperPluginInstance* instance_object = 369 PepperPluginInstance* instance_object =
373 renderer_ppapi_host_->GetPluginInstance(pp_instance()); 370 renderer_ppapi_host_->GetPluginInstance(pp_instance());
374 if (!instance_object) 371 if (!instance_object)
375 return NULL; 372 return NULL;
376 return instance_object->GetContainer()->element().document().frame(); 373 return instance_object->GetContainer()->element().document().frame();
377 } 374 }
378 375
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 ppapi::proxy::ResourceMessageReplyParams params; 420 ppapi::proxy::ResourceMessageReplyParams params;
424 SendUpdateToPlugin(new PpapiPluginMsg_URLLoader_UpdateProgress( 421 SendUpdateToPlugin(new PpapiPluginMsg_URLLoader_UpdateProgress(
425 record_upload ? bytes_sent_ : -1, 422 record_upload ? bytes_sent_ : -1,
426 record_upload ? total_bytes_to_be_sent_ : -1, 423 record_upload ? total_bytes_to_be_sent_ : -1,
427 record_download ? bytes_received_ : -1, 424 record_download ? bytes_received_ : -1,
428 record_download ? total_bytes_to_be_received_ : -1)); 425 record_download ? total_bytes_to_be_received_ : -1));
429 } 426 }
430 } 427 }
431 428
432 } // namespace content 429 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698