OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_pdf_host.h" | 5 #include "chrome/renderer/pepper/pepper_pdf_host.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/common/render_messages.h" | 8 #include "chrome/common/render_messages.h" |
9 #include "chrome/renderer/printing/print_web_view_helper.h" | 9 #include "chrome/renderer/printing/print_web_view_helper.h" |
10 #include "content/public/common/referrer.h" | 10 #include "content/public/common/referrer.h" |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 WebKit::WebView* view = | 239 WebKit::WebView* view = |
240 instance->GetContainer()->element().document().frame()->view(); | 240 instance->GetContainer()->element().document().frame()->view(); |
241 content::RenderView* render_view = content::RenderView::FromWebView(view); | 241 content::RenderView* render_view = content::RenderView::FromWebView(view); |
242 render_view->Send(new ChromeViewHostMsg_PDFHasUnsupportedFeature( | 242 render_view->Send(new ChromeViewHostMsg_PDFHasUnsupportedFeature( |
243 render_view->GetRoutingID())); | 243 render_view->GetRoutingID())); |
244 return PP_OK; | 244 return PP_OK; |
245 } | 245 } |
246 | 246 |
247 int32_t PepperPDFHost::OnHostMsgPrint( | 247 int32_t PepperPDFHost::OnHostMsgPrint( |
248 ppapi::host::HostMessageContext* context) { | 248 ppapi::host::HostMessageContext* context) { |
249 #if defined(ENABLE_PRINTING) | 249 #if defined(ENABLE_FULL_PRINTING) |
250 content::PepperPluginInstance* instance = | 250 content::PepperPluginInstance* instance = |
251 host_->GetPluginInstance(pp_instance()); | 251 host_->GetPluginInstance(pp_instance()); |
252 if (!instance) | 252 if (!instance) |
253 return PP_ERROR_FAILED; | 253 return PP_ERROR_FAILED; |
254 | 254 |
255 WebKit::WebElement element = instance->GetContainer()->element(); | 255 WebKit::WebElement element = instance->GetContainer()->element(); |
256 WebKit::WebView* view = element.document().frame()->view(); | 256 WebKit::WebView* view = element.document().frame()->view(); |
257 content::RenderView* render_view = content::RenderView::FromWebView(view); | 257 content::RenderView* render_view = content::RenderView::FromWebView(view); |
258 | 258 |
259 using printing::PrintWebViewHelper; | 259 using printing::PrintWebViewHelper; |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 bitmap->getSize(), | 394 bitmap->getSize(), |
395 bitmap->rowBytes()); | 395 bitmap->rowBytes()); |
396 | 396 |
397 if (needs_unmapping) | 397 if (needs_unmapping) |
398 image_data->Unmap(); | 398 image_data->Unmap(); |
399 | 399 |
400 return true; | 400 return true; |
401 } | 401 } |
402 | 402 |
403 } // namespace chrome | 403 } // namespace chrome |
OLD | NEW |