| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 PPAPI_CPP_DEV_PRINTING_DEV_H_ | 5 #ifndef PPAPI_CPP_DEV_PRINTING_DEV_H_ |
| 6 #define PPAPI_CPP_DEV_PRINTING_DEV_H_ | 6 #define PPAPI_CPP_DEV_PRINTING_DEV_H_ |
| 7 | 7 |
| 8 #include "ppapi/c/dev/ppp_printing_dev.h" | 8 #include "ppapi/c/dev/ppp_printing_dev.h" |
| 9 #include "ppapi/cpp/resource.h" | 9 #include "ppapi/cpp/resource.h" |
| 10 | 10 |
| 11 namespace pp { | 11 namespace pp { |
| 12 | 12 |
| 13 class Instance; | 13 class Instance; |
| 14 | 14 |
| 15 // You would typically use this either via inheritance on your instance or | 15 // You would typically use this either via inheritance on your instance or |
| 16 // by composition: see find_dev.h for an example. | 16 // by composition: see find_dev.h for an example. |
| 17 class Printing_Dev { | 17 class Printing_Dev { |
| 18 public: | 18 public: |
| 19 // The instance parameter must outlive this class. | 19 // The instance parameter must outlive this class. |
| 20 explicit Printing_Dev(Instance* instance); | 20 explicit Printing_Dev(Instance* instance); |
| 21 virtual ~Printing_Dev(); | 21 virtual ~Printing_Dev(); |
| 22 | 22 |
| 23 // PPP_Printing_Dev functions exposed as virtual functions for you to | 23 // PPP_Printing_Dev functions exposed as virtual functions for you to |
| 24 // override. | 24 // override. |
| 25 virtual uint32_t QuerySupportedPrintOutputFormats() = 0; | 25 virtual uint32_t QuerySupportedPrintOutputFormats() = 0; |
| 26 virtual bool IsPrintScalingDisabled() = 0; |
| 26 virtual int32_t PrintBegin(const PP_PrintSettings_Dev& print_settings) = 0; | 27 virtual int32_t PrintBegin(const PP_PrintSettings_Dev& print_settings) = 0; |
| 27 virtual Resource PrintPages(const PP_PrintPageNumberRange_Dev* page_ranges, | 28 virtual Resource PrintPages(const PP_PrintPageNumberRange_Dev* page_ranges, |
| 28 uint32_t page_range_count) = 0; | 29 uint32_t page_range_count) = 0; |
| 29 virtual void PrintEnd() = 0; | 30 virtual void PrintEnd() = 0; |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 Instance* associated_instance_; | 33 Instance* associated_instance_; |
| 33 }; | 34 }; |
| 34 | 35 |
| 35 } // namespace pp | 36 } // namespace pp |
| 36 | 37 |
| 37 #endif // PPAPI_CPP_DEV_PRINTING_DEV_H_ | 38 #endif // PPAPI_CPP_DEV_PRINTING_DEV_H_ |
| OLD | NEW |