Chromium Code Reviews| Index: components/pdf/renderer/ppb_pdf_impl.h |
| diff --git a/chrome/renderer/pepper/ppb_pdf_impl.h b/components/pdf/renderer/ppb_pdf_impl.h |
| similarity index 50% |
| rename from chrome/renderer/pepper/ppb_pdf_impl.h |
| rename to components/pdf/renderer/ppb_pdf_impl.h |
| index 1b88f477c6345465b09edd1978aeb618aec8d610..55eda541b326dc8cc57aeb5ebcaacdee31e33255 100644 |
| --- a/chrome/renderer/pepper/ppb_pdf_impl.h |
| +++ b/components/pdf/renderer/ppb_pdf_impl.h |
| @@ -1,16 +1,27 @@ |
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| -#ifndef CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ |
| -#define CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ |
| +#ifndef COMPONENT_PDF_RENDERER_PPB_PDF_IMPL_H_ |
| +#define COMPONENT_PDF_RENDERER_PPB_PDF_IMPL_H_ |
| #include "ppapi/c/pp_instance.h" |
| struct PPB_PDF; |
| +namespace pdf { |
| + |
| class PPB_PDF_Impl { |
| public: |
| + class PrintDelegate { |
| + public: |
| + virtual ~PrintDelegate() {} |
| + |
| + virtual bool IsPrintingEnabled(PP_Instance instance_id) = 0; |
|
Lei Zhang
2014/08/26 22:41:31
Comments please.
sadrul
2014/08/27 00:09:52
Done.
|
| + |
| + virtual void Print(PP_Instance instance_id) = 0; |
| + }; |
| + |
| // Returns a pointer to the interface implementing PPB_PDF that is exposed |
| // to the plugin. |
| static const PPB_PDF* GetInterface(); |
| @@ -18,6 +29,10 @@ class PPB_PDF_Impl { |
| // Invokes the "Print" command for the given instance as if the user right |
| // clicked on it and selected "Print". |
| static void InvokePrintingForInstance(PP_Instance instance); |
| + |
| + static void SetPrintDelegate(PrintDelegate* print_delegate); |
|
Lei Zhang
2014/08/26 22:41:31
Can you comment on the ownership of |print_delegat
sadrul
2014/08/27 00:09:52
Done.
|
| }; |
| -#endif // CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ |
| +} // namespace pdf |
| + |
| +#endif // COMPONENT_PDF_RENDERER_PPB_PDF_IMPL_H_ |