| 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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1703 if (!pdf_module) | 1703 if (!pdf_module) |
| 1704 return false; | 1704 return false; |
| 1705 RenderPDFPageToDCProc render_proc = | 1705 RenderPDFPageToDCProc render_proc = |
| 1706 reinterpret_cast<RenderPDFPageToDCProc>( | 1706 reinterpret_cast<RenderPDFPageToDCProc>( |
| 1707 GetProcAddress(pdf_module, "RenderPDFPageToDC")); | 1707 GetProcAddress(pdf_module, "RenderPDFPageToDC")); |
| 1708 if (!render_proc) | 1708 if (!render_proc) |
| 1709 return false; | 1709 return false; |
| 1710 #endif // defined(OS_WIN) | 1710 #endif // defined(OS_WIN) |
| 1711 | 1711 |
| 1712 bool ret = false; | 1712 bool ret = false; |
| 1713 #if defined(OS_LINUX) || defined(OS_MACOSX) | 1713 #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) |
| 1714 // On Linux we just set the final bits in the native metafile | 1714 // On Linux we just set the final bits in the native metafile |
| 1715 // (NativeMetafile and PreviewMetafile must have compatible formats, | 1715 // (NativeMetafile and PreviewMetafile must have compatible formats, |
| 1716 // i.e. both PDF for this to work). | 1716 // i.e. both PDF for this to work). |
| 1717 printing::Metafile* metafile = | 1717 printing::Metafile* metafile = |
| 1718 printing::MetafileSkiaWrapper::GetMetafileFromCanvas(*canvas); | 1718 printing::MetafileSkiaWrapper::GetMetafileFromCanvas(*canvas); |
| 1719 DCHECK(metafile != NULL); | 1719 DCHECK(metafile != NULL); |
| 1720 if (metafile) | 1720 if (metafile) |
| 1721 ret = metafile->InitFromData(mapper.data(), mapper.size()); | 1721 ret = metafile->InitFromData(mapper.data(), mapper.size()); |
| 1722 #elif defined(OS_WIN) | 1722 #elif defined(OS_WIN) |
| 1723 printing::Metafile* metafile = | 1723 printing::Metafile* metafile = |
| (...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2613 screen_size_for_fullscreen_ = gfx::Size(); | 2613 screen_size_for_fullscreen_ = gfx::Size(); |
| 2614 WebElement element = container_->element(); | 2614 WebElement element = container_->element(); |
| 2615 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); | 2615 element.setAttribute(WebString::fromUTF8(kWidth), width_before_fullscreen_); |
| 2616 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); | 2616 element.setAttribute(WebString::fromUTF8(kHeight), height_before_fullscreen_); |
| 2617 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); | 2617 element.setAttribute(WebString::fromUTF8(kBorder), border_before_fullscreen_); |
| 2618 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); | 2618 element.setAttribute(WebString::fromUTF8(kStyle), style_before_fullscreen_); |
| 2619 } | 2619 } |
| 2620 | 2620 |
| 2621 } // namespace ppapi | 2621 } // namespace ppapi |
| 2622 } // namespace webkit | 2622 } // namespace webkit |
| OLD | NEW |