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

Side by Side Diff: content/renderer/pepper/pepper_plugin_instance_impl.h

Issue 1267713003: Make the WebURLLoaderClients in the pepper code destroy (or have some guard) the loader in didFail() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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
OLDNEW
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 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ 5 #ifndef CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_
6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ 6 #define CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_
7 7
8 #include <list> 8 #include <list>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 // Class to record document load notifications and play them back once the 545 // Class to record document load notifications and play them back once the
546 // real document loader becomes available. Used only by external instances. 546 // real document loader becomes available. Used only by external instances.
547 class ExternalDocumentLoader : public blink::WebURLLoaderClient { 547 class ExternalDocumentLoader : public blink::WebURLLoaderClient {
548 public: 548 public:
549 ExternalDocumentLoader(); 549 ExternalDocumentLoader();
550 virtual ~ExternalDocumentLoader(); 550 virtual ~ExternalDocumentLoader();
551 551
552 void ReplayReceivedData(WebURLLoaderClient* document_loader); 552 void ReplayReceivedData(WebURLLoaderClient* document_loader);
553 553
554 // blink::WebURLLoaderClient implementation. 554 // blink::WebURLLoaderClient implementation.
555 virtual void didReceiveData(blink::WebURLLoader* loader, 555 void didReceiveData(blink::WebURLLoader* loader,
556 const char* data, 556 const char* data,
557 int data_length, 557 int data_length,
558 int encoded_data_length); 558 int encoded_data_length) override;
559 virtual void didFinishLoading(blink::WebURLLoader* loader, 559 void didFinishLoading(blink::WebURLLoader* loader,
560 double finish_time, 560 double finish_time,
561 int64_t total_encoded_data_length); 561 int64_t total_encoded_data_length) override;
562 virtual void didFail(blink::WebURLLoader* loader, 562 void didFail(blink::WebURLLoader* loader,
563 const blink::WebURLError& error); 563 const blink::WebURLError& error) override;
564 564
565 private: 565 private:
566 std::list<std::string> data_; 566 std::list<std::string> data_;
567 bool finished_loading_; 567 bool finished_loading_;
568 scoped_ptr<blink::WebURLError> error_; 568 scoped_ptr<blink::WebURLError> error_;
569 }; 569 };
570 570
571 // Implements PPB_Gamepad_API. This is just to avoid having an excessive 571 // Implements PPB_Gamepad_API. This is just to avoid having an excessive
572 // number of interfaces implemented by PepperPluginInstanceImpl. 572 // number of interfaces implemented by PepperPluginInstanceImpl.
573 class GamepadImpl : public ppapi::thunk::PPB_Gamepad_API, 573 class GamepadImpl : public ppapi::thunk::PPB_Gamepad_API,
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 // view change events. 919 // view change events.
920 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_; 920 base::WeakPtrFactory<PepperPluginInstanceImpl> view_change_weak_ptr_factory_;
921 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_; 921 base::WeakPtrFactory<PepperPluginInstanceImpl> weak_factory_;
922 922
923 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl); 923 DISALLOW_COPY_AND_ASSIGN(PepperPluginInstanceImpl);
924 }; 924 };
925 925
926 } // namespace content 926 } // namespace content
927 927
928 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_ 928 #endif // CONTENT_RENDERER_PEPPER_PEPPER_PLUGIN_INSTANCE_IMPL_H_
OLDNEW
« no previous file with comments | « components/nacl/renderer/ppb_nacl_private_impl.cc ('k') | content/renderer/pepper/pepper_plugin_instance_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698