| Index: ppapi/cpp/dev/printing_dev.cc
|
| diff --git a/ppapi/cpp/dev/printing_dev.cc b/ppapi/cpp/dev/printing_dev.cc
|
| index 60154cd0d37f85f58d5e3115322cd56b67c6760d..7e1cc18927ca9bdf43865b8a58045f442dc030ab 100644
|
| --- a/ppapi/cpp/dev/printing_dev.cc
|
| +++ b/ppapi/cpp/dev/printing_dev.cc
|
| @@ -16,8 +16,8 @@ namespace {
|
|
|
| static const char kPPPPrintingInterface[] = PPP_PRINTING_DEV_INTERFACE;
|
|
|
| -template <> const char* interface_name<PPB_Printing_Dev_0_7>() {
|
| - return PPB_PRINTING_DEV_INTERFACE_0_7;
|
| +template <> const char* interface_name<PPB_Printing_Dev_0_8>() {
|
| + return PPB_PRINTING_DEV_INTERFACE_0_8;
|
| }
|
|
|
| uint32_t QuerySupportedFormats(PP_Instance instance) {
|
| @@ -80,8 +80,8 @@ Printing_Dev::Printing_Dev(Instance* instance)
|
| Module::Get()->AddPluginInterface(kPPPPrintingInterface, &ppp_printing);
|
| instance->AddPerInstanceObject(
|
| kPPPPrintingInterface, this);
|
| - if (has_interface<PPB_Printing_Dev_0_7>()) {
|
| - PassRefFromConstructor(get_interface<PPB_Printing_Dev_0_7>()->Create(
|
| + if (has_interface<PPB_Printing_Dev_0_8>()) {
|
| + PassRefFromConstructor(get_interface<PPB_Printing_Dev_0_8>()->Create(
|
| associated_instance_.pp_instance()));
|
| }
|
| }
|
| @@ -93,16 +93,24 @@ Printing_Dev::~Printing_Dev() {
|
|
|
| // static
|
| bool Printing_Dev::IsAvailable() {
|
| - return has_interface<PPB_Printing_Dev_0_7>();
|
| + return has_interface<PPB_Printing_Dev_0_8>();
|
| }
|
|
|
| int32_t Printing_Dev::GetDefaultPrintSettings(
|
| const CompletionCallbackWithOutput<PP_PrintSettings_Dev>& callback) const {
|
| - if (has_interface<PPB_Printing_Dev_0_7>()) {
|
| - return get_interface<PPB_Printing_Dev_0_7>()->GetDefaultPrintSettings(
|
| + if (has_interface<PPB_Printing_Dev_0_8>()) {
|
| + return get_interface<PPB_Printing_Dev_0_8>()->GetDefaultPrintSettings(
|
| pp_resource(), callback.output(), callback.pp_completion_callback());
|
| }
|
| return callback.MayForce(PP_ERROR_NOINTERFACE);
|
| }
|
|
|
| +void Printing_Dev::SetPrintPresetOptionsFromDocument(
|
| + PP_PrintPresetOptions_Dev& print_options) {
|
| + if (has_interface<PPB_Printing_Dev_0_8>()) {
|
| + return get_interface<PPB_Printing_Dev_0_8>()
|
| + ->SetPrintPresetOptionsFromDocument(pp_resource(), &print_options);
|
| + }
|
| +}
|
| +
|
| } // namespace pp
|
|
|