| OLD | NEW |
| 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 Loading... |
| 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 host_(host), | 43 weak_factory_(this), |
| 44 weak_factory_(this) { | 44 host_(host) { |
| 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 Loading... |
| 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 |
| OLD | NEW |