| 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/ppapi_plugin_instance.h" |
| 10 #include "content/public/renderer/render_thread.h" | 11 #include "content/public/renderer/render_thread.h" |
| 11 #include "content/public/renderer/renderer_ppapi_host.h" | 12 #include "content/public/renderer/renderer_ppapi_host.h" |
| 12 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
| 13 #include "ppapi/c/pp_errors.h" | 14 #include "ppapi/c/pp_errors.h" |
| 14 #include "ppapi/c/trusted/ppb_browser_font_trusted.h" | 15 #include "ppapi/c/trusted/ppb_browser_font_trusted.h" |
| 15 #include "ppapi/host/dispatch_host_message.h" | 16 #include "ppapi/host/dispatch_host_message.h" |
| 16 #include "ppapi/proxy/host_dispatcher.h" | 17 #include "ppapi/proxy/host_dispatcher.h" |
| 17 #include "ppapi/proxy/ppapi_messages.h" | 18 #include "ppapi/proxy/ppapi_messages.h" |
| 18 #include "ppapi/proxy/resource_message_params.h" | 19 #include "ppapi/proxy/resource_message_params.h" |
| 19 #include "ppapi/proxy/serialized_structs.h" | 20 #include "ppapi/proxy/serialized_structs.h" |
| 20 #include "ppapi/thunk/enter.h" | 21 #include "ppapi/thunk/enter.h" |
| 21 #include "ppapi/thunk/ppb_image_data_api.h" | 22 #include "ppapi/thunk/ppb_image_data_api.h" |
| 22 #include "skia/ext/platform_canvas.h" | 23 #include "skia/ext/platform_canvas.h" |
| 23 #include "third_party/skia/include/core/SkCanvas.h" | 24 #include "third_party/skia/include/core/SkCanvas.h" |
| 24 #include "third_party/skia/include/core/SkMatrix.h" | 25 #include "third_party/skia/include/core/SkMatrix.h" |
| 25 #include "third_party/skia/include/core/SkPaint.h" | 26 #include "third_party/skia/include/core/SkPaint.h" |
| 26 #include "third_party/skia/include/core/SkPoint.h" | 27 #include "third_party/skia/include/core/SkPoint.h" |
| 27 #include "third_party/skia/include/core/SkTemplates.h" | 28 #include "third_party/skia/include/core/SkTemplates.h" |
| 28 #include "third_party/skia/include/core/SkTypeface.h" | 29 #include "third_party/skia/include/core/SkTypeface.h" |
| 29 #include "ui/gfx/rect.h" | 30 #include "ui/gfx/rect.h" |
| 30 #include "url/gurl.h" | 31 #include "url/gurl.h" |
| 31 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | |
| 32 | 32 |
| 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) |
| (...skipping 208 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 |