Chromium Code Reviews| Index: ppapi/cpp/dev/printing_dev.cc |
| diff --git a/ppapi/cpp/dev/printing_dev.cc b/ppapi/cpp/dev/printing_dev.cc |
| index 72affff56a1f27872d40e7033793799fc8290b3e..257270f06877401a8288f9ea11d0889993da83d8 100644 |
| --- a/ppapi/cpp/dev/printing_dev.cc |
| +++ b/ppapi/cpp/dev/printing_dev.cc |
| @@ -4,6 +4,7 @@ |
| #include "ppapi/cpp/dev/printing_dev.h" |
| +#include "ppapi/c/dev/ppb_printing_dev.h" |
| #include "ppapi/cpp/instance.h" |
| #include "ppapi/cpp/instance_handle.h" |
| #include "ppapi/cpp/module.h" |
| @@ -15,6 +16,10 @@ namespace { |
| static const char kPPPPrintingInterface[] = PPP_PRINTING_DEV_INTERFACE; |
| +template <> const char* interface_name<PPB_Printing_Dev_0_6>() { |
| + return PPB_PRINTING_DEV_INTERFACE_0_6; |
| +} |
| + |
| uint32_t QuerySupportedFormats(PP_Instance instance) { |
| void* object = |
| Instance::GetPerInstanceObject(instance, kPPPPrintingInterface); |
| @@ -81,4 +86,14 @@ Printing_Dev::~Printing_Dev() { |
| kPPPPrintingInterface, this); |
| } |
| +bool Printing_Dev::GetDefaultPrintSettings( |
| + const InstanceHandle& instance_handle, |
|
yzshen1
2012/06/14 05:01:38
Can we use associated_instance_?
raymes
2012/06/14 17:30:49
Done.
|
| + PP_PrintSettings_Dev* print_settings) { |
| + if (!has_interface<PPB_Printing_Dev_0_6>()) |
| + return PP_FALSE; |
| + return PP_ToBool( |
| + get_interface<PPB_Printing_Dev_0_6>()->GetDefaultPrintSettings( |
| + instance_handle.pp_instance(), print_settings)); |
| +} |
| + |
| } // namespace pp |