OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/pdf/renderer/pepper_pdf_host.h" | 5 #include "components/pdf/renderer/pepper_pdf_host.h" |
6 | 6 |
7 #include "components/pdf/common/pdf_messages.h" | 7 #include "components/pdf/common/pdf_messages.h" |
8 #include "components/pdf/renderer/pdf_resource_util.h" | 8 #include "components/pdf/renderer/pdf_resource_util.h" |
9 #include "components/pdf/renderer/ppb_pdf_impl.h" | 9 #include "components/pdf/renderer/ppb_pdf_impl.h" |
10 #include "content/public/common/referrer.h" | 10 #include "content/public/common/referrer.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "ppapi/thunk/enter.h" | 23 #include "ppapi/thunk/enter.h" |
24 #include "ppapi/thunk/ppb_image_data_api.h" | 24 #include "ppapi/thunk/ppb_image_data_api.h" |
25 #include "skia/ext/platform_canvas.h" | 25 #include "skia/ext/platform_canvas.h" |
26 #include "third_party/WebKit/public/web/WebDocument.h" | 26 #include "third_party/WebKit/public/web/WebDocument.h" |
27 #include "third_party/WebKit/public/web/WebElement.h" | 27 #include "third_party/WebKit/public/web/WebElement.h" |
28 #include "third_party/WebKit/public/web/WebLocalFrame.h" | 28 #include "third_party/WebKit/public/web/WebLocalFrame.h" |
29 #include "third_party/WebKit/public/web/WebPluginContainer.h" | 29 #include "third_party/WebKit/public/web/WebPluginContainer.h" |
30 #include "third_party/WebKit/public/web/WebView.h" | 30 #include "third_party/WebKit/public/web/WebView.h" |
31 #include "third_party/skia/include/core/SkBitmap.h" | 31 #include "third_party/skia/include/core/SkBitmap.h" |
32 #include "ui/base/layout.h" | 32 #include "ui/base/layout.h" |
| 33 #include "ui/gfx/geometry/point.h" |
33 #include "ui/gfx/image/image_skia.h" | 34 #include "ui/gfx/image/image_skia.h" |
34 #include "ui/gfx/image/image_skia_rep.h" | 35 #include "ui/gfx/image/image_skia_rep.h" |
35 #include "ui/gfx/point.h" | |
36 | 36 |
37 namespace pdf { | 37 namespace pdf { |
38 | 38 |
39 PepperPDFHost::PepperPDFHost(content::RendererPpapiHost* host, | 39 PepperPDFHost::PepperPDFHost(content::RendererPpapiHost* host, |
40 PP_Instance instance, | 40 PP_Instance instance, |
41 PP_Resource resource) | 41 PP_Resource resource) |
42 : ppapi::host::ResourceHost(host->GetPpapiHost(), instance, resource), | 42 : ppapi::host::ResourceHost(host->GetPpapiHost(), instance, resource), |
43 host_(host) {} | 43 host_(host) {} |
44 | 44 |
45 PepperPDFHost::~PepperPDFHost() {} | 45 PepperPDFHost::~PepperPDFHost() {} |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 pixels_to_write.copyPixelsTo( | 282 pixels_to_write.copyPixelsTo( |
283 bitmap->getPixels(), bitmap->getSize(), bitmap->rowBytes()); | 283 bitmap->getPixels(), bitmap->getSize(), bitmap->rowBytes()); |
284 | 284 |
285 if (needs_unmapping) | 285 if (needs_unmapping) |
286 image_data->Unmap(); | 286 image_data->Unmap(); |
287 | 287 |
288 return true; | 288 return true; |
289 } | 289 } |
290 | 290 |
291 } // namespace pdf | 291 } // namespace pdf |
OLD | NEW |