summaryrefslogtreecommitdiffstats
path: root/ppapi/example
diff options
context:
space:
mode:
authorvandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-28 20:58:01 +0000
committervandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-28 20:58:01 +0000
commit8815b11a9262edd6a6d2c47504b043780d401a49 (patch)
treeaa76183d5bb7e928072268f94ea860b9990d29ea /ppapi/example
parent085457cb23274fffc63f51882e6ada795ae70412 (diff)
downloadchromium_src-8815b11a9262edd6a6d2c47504b043780d401a49.zip
chromium_src-8815b11a9262edd6a6d2c47504b043780d401a49.tar.gz
chromium_src-8815b11a9262edd6a6d2c47504b043780d401a49.tar.bz2
Add IsScalingDisabled and PP_PRINTOUTPUTFORMAT_EMF to pepper printing interface.
IsScalingDisabled will let us handle PDFS that don't want to be scaled. PP_PRINTOUTPUTFORMAT_EMF is to simply the printing flow on Windows. BUG=67091, 92045, 91880, 92000, 92218, 95905 TEST=NONE Review URL: http://codereview.chromium.org/8041052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103177 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/example')
-rw-r--r--ppapi/example/example.cc16
1 files changed, 6 insertions, 10 deletions
diff --git a/ppapi/example/example.cc b/ppapi/example/example.cc
index 1eec317..0caceff 100644
--- a/ppapi/example/example.cc
+++ b/ppapi/example/example.cc
@@ -328,16 +328,8 @@ int gettimeofday(struct timeval *tv, struct timezone*) {
}
// Print interfaces.
- // TODO(mball,dmichael) Replace this with the PPP_PRINTING_DEV_USE_0_4 version
- virtual PP_PrintOutputFormat_Dev* QuerySupportedPrintOutputFormats(
- uint32_t* format_count) {
- pp::Memory_Dev memory;
- PP_PrintOutputFormat_Dev* format =
- static_cast<PP_PrintOutputFormat_Dev*>(
- memory.MemAlloc(sizeof(PP_PrintOutputFormat_Dev)));
- *format = PP_PRINTOUTPUTFORMAT_RASTER;
- *format_count = 1;
- return format;
+ virtual uint32_t QuerySupportedPrintOutputFormats() {
+ return PP_PRINTOUTPUTFORMAT_RASTER;
}
virtual int32_t PrintBegin(const PP_PrintSettings_Dev& print_settings) {
@@ -378,6 +370,10 @@ int gettimeofday(struct timeval *tv, struct timezone*) {
print_settings_valid_ = false;
}
+ virtual bool IsScalingDisabled() {
+ return false;
+ }
+
void OnFlush() {
if (animation_counter_ % kStepsPerCircle == 0)
UpdateFps();