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

Side by Side Diff: chrome/renderer/pepper/pepper_flash_renderer_host.cc

Issue 26308002: Fix some WeakPtrFactory members that aren't last (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix weak ptr initialization Created 7 years, 2 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
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 #include "chrome/renderer/pepper/pepper_flash_renderer_host.h" 5 #include "chrome/renderer/pepper/pepper_flash_renderer_host.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chrome/renderer/pepper/ppb_pdf_impl.h" 9 #include "chrome/renderer/pepper/ppb_pdf_impl.h"
10 #include "content/public/renderer/pepper_plugin_instance.h" 10 #include "content/public/renderer/pepper_plugin_instance.h"
(...skipping 22 matching lines...) Expand all
33 using ppapi::thunk::EnterResourceNoLock; 33 using ppapi::thunk::EnterResourceNoLock;
34 using ppapi::thunk::PPB_ImageData_API; 34 using ppapi::thunk::PPB_ImageData_API;
35 35
36 namespace chrome { 36 namespace chrome {
37 37
38 PepperFlashRendererHost::PepperFlashRendererHost( 38 PepperFlashRendererHost::PepperFlashRendererHost(
39 content::RendererPpapiHost* host, 39 content::RendererPpapiHost* host,
40 PP_Instance instance, 40 PP_Instance instance,
41 PP_Resource resource) 41 PP_Resource resource)
42 : ResourceHost(host->GetPpapiHost(), instance, resource), 42 : ResourceHost(host->GetPpapiHost(), instance, resource),
43 weak_factory_(this), 43 host_(host),
44 host_(host) { 44 weak_factory_(this) {
45 } 45 }
46 46
47 PepperFlashRendererHost::~PepperFlashRendererHost() { 47 PepperFlashRendererHost::~PepperFlashRendererHost() {
48 // This object may be destroyed in the middle of a sync message. If that is 48 // This object may be destroyed in the middle of a sync message. If that is
49 // the case, make sure we respond to all the pending navigate calls. 49 // the case, make sure we respond to all the pending navigate calls.
50 std::vector<ppapi::host::ReplyMessageContext>::reverse_iterator it; 50 std::vector<ppapi::host::ReplyMessageContext>::reverse_iterator it;
51 for (it = navigate_replies_.rbegin(); it != navigate_replies_.rend(); ++it) 51 for (it = navigate_replies_.rbegin(); it != navigate_replies_.rend(); ++it)
52 SendReply(*it, IPC::Message()); 52 SendReply(*it, IPC::Message());
53 } 53 }
54 54
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 return PP_ERROR_FAILED; 250 return PP_ERROR_FAILED;
251 } 251 }
252 252
253 int32_t PepperFlashRendererHost::OnInvokePrinting( 253 int32_t PepperFlashRendererHost::OnInvokePrinting(
254 ppapi::host::HostMessageContext* host_context) { 254 ppapi::host::HostMessageContext* host_context) {
255 PPB_PDF_Impl::InvokePrintingForInstance(pp_instance()); 255 PPB_PDF_Impl::InvokePrintingForInstance(pp_instance());
256 return PP_OK; 256 return PP_OK;
257 } 257 }
258 258
259 } // namespace chrome 259 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/renderer/pepper/pepper_flash_renderer_host.h ('k') | content/renderer/pepper/content_decryptor_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698