OLD | NEW |
1 // Copyright (c) 2012 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 #ifndef CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ | 5 #ifndef COMPONENT_PDF_RENDERER_PPB_PDF_IMPL_H_ |
6 #define CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ | 6 #define COMPONENT_PDF_RENDERER_PPB_PDF_IMPL_H_ |
7 | 7 |
8 #include "ppapi/c/pp_instance.h" | 8 #include "ppapi/c/pp_instance.h" |
9 | 9 |
10 struct PPB_PDF; | 10 struct PPB_PDF; |
11 | 11 |
| 12 namespace pdf { |
| 13 |
12 class PPB_PDF_Impl { | 14 class PPB_PDF_Impl { |
13 public: | 15 public: |
| 16 class PrintDelegate { |
| 17 public: |
| 18 virtual ~PrintDelegate() {} |
| 19 |
| 20 virtual bool IsPrintingEnabled(PP_Instance instance_id) = 0; |
| 21 |
| 22 virtual void Print(PP_Instance instance_id) = 0; |
| 23 }; |
| 24 |
14 // Returns a pointer to the interface implementing PPB_PDF that is exposed | 25 // Returns a pointer to the interface implementing PPB_PDF that is exposed |
15 // to the plugin. | 26 // to the plugin. |
16 static const PPB_PDF* GetInterface(); | 27 static const PPB_PDF* GetInterface(); |
17 | 28 |
18 // Invokes the "Print" command for the given instance as if the user right | 29 // Invokes the "Print" command for the given instance as if the user right |
19 // clicked on it and selected "Print". | 30 // clicked on it and selected "Print". |
20 static void InvokePrintingForInstance(PP_Instance instance); | 31 static void InvokePrintingForInstance(PP_Instance instance); |
| 32 |
| 33 static void SetPrintDelegate(PrintDelegate* print_delegate); |
21 }; | 34 }; |
22 | 35 |
23 #endif // CHROME_RENDERER_PEPPER_PPB_PDF_IMPL_H_ | 36 } // namespace pdf |
| 37 |
| 38 #endif // COMPONENT_PDF_RENDERER_PPB_PDF_IMPL_H_ |
OLD | NEW |