Chromium Code Reviews| Index: chrome/renderer/pepper/ppb_pdf_impl.cc |
| diff --git a/chrome/renderer/chrome_ppb_pdf_impl.cc b/chrome/renderer/pepper/ppb_pdf_impl.cc |
| similarity index 93% |
| rename from chrome/renderer/chrome_ppb_pdf_impl.cc |
| rename to chrome/renderer/pepper/ppb_pdf_impl.cc |
| index 41bdc2bdce3a8e111f79946211c136c519efd927..8692567f85f8dcdc8188a704edb8112e5ee7bfe5 100644 |
| --- a/chrome/renderer/chrome_ppb_pdf_impl.cc |
| +++ b/chrome/renderer/pepper/ppb_pdf_impl.cc |
| @@ -2,13 +2,13 @@ |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#include "chrome/renderer/chrome_ppb_pdf_impl.h" |
| +#include "chrome/renderer/pepper/ppb_pdf_impl.h" |
| #include "base/metrics/histogram.h" |
| #include "base/utf_string_conversions.h" |
| #include "build/build_config.h" |
| #include "chrome/common/render_messages.h" |
| -#include "chrome/renderer/print_web_view_helper.h" |
| +#include "chrome/renderer/pepper/ppb_flash_print_impl.h" |
| #include "content/public/common/child_process_sandbox_support_linux.h" |
| #include "content/public/common/content_client.h" |
| #include "content/public/renderer/render_thread.h" |
| @@ -21,13 +21,11 @@ |
| #include "ppapi/shared_impl/resource_tracker.h" |
| #include "ppapi/shared_impl/var.h" |
| #include "skia/ext/platform_canvas.h" |
| +#include "third_party/skia/include/core/SkBitmap.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| -#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
| -#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| -#include "third_party/skia/include/core/SkBitmap.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "unicode/usearch.h" |
| @@ -43,7 +41,7 @@ using WebKit::WebElement; |
| using WebKit::WebView; |
| using content::RenderThread; |
| -namespace chrome { |
| +namespace { |
| #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| class PrivateFontFile : public ppapi::Resource { |
| @@ -290,7 +288,8 @@ void SearchString(PP_Instance instance, |
| } |
| void DidStartLoading(PP_Instance instance_id) { |
| - PluginInstance* instance = content::GetHostGlobals()->GetInstance(instance_id); |
| + PluginInstance* instance = |
| + content::GetHostGlobals()->GetInstance(instance_id); |
| if (!instance) |
| return; |
| instance->delegate()->DidStartLoading(); |
| @@ -347,21 +346,6 @@ void SaveAs(PP_Instance instance_id) { |
| instance->delegate()->SaveURLAs(instance->plugin_url()); |
| } |
| -void Print(PP_Instance instance_id) { |
| - PluginInstance* instance = HostGlobals::Get()->GetInstance(instance_id); |
| - if (!instance) |
| - return; |
| - |
| - WebElement element = instance->container()->element(); |
| - WebView* view = element.document().frame()->view(); |
| - content::RenderView* render_view = content::RenderView::FromWebView(view); |
| - |
| - PrintWebViewHelper* print_view_helper = PrintWebViewHelper::Get(render_view); |
| - if (print_view_helper) { |
| - print_view_helper->PrintNode(element); |
| - } |
| -} |
| - |
| const PPB_PDF ppb_pdf = { |
| &GetLocalizedString, |
| &GetResourceImage, |
| @@ -375,12 +359,12 @@ const PPB_PDF ppb_pdf = { |
| &UserMetricsRecordAction, |
| &HasUnsupportedFeature, |
| &SaveAs, |
| + &PPB_Flash_Print_Impl::InvokePrintingForInstance |
|
jam
2012/04/25 21:31:34
this is used by pdf, so it's odd that it's calling
|
| }; |
| +} // namespace |
| + |
| // static |
| const PPB_PDF* PPB_PDF_Impl::GetInterface() { |
| return &ppb_pdf; |
| } |
| - |
| -} // namespace chrome |