Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Side by Side Diff: ppapi/example/example.cc

Issue 8041052: Add IsScalingDisabled and PP_PRINTOUTPUTFORMAT_EMF to pepper printing interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include <math.h> 5 #include <math.h>
6 #include <stdio.h> // FIXME(brettw) erase me. 6 #include <stdio.h> // FIXME(brettw) erase me.
7 #ifndef _WIN32 7 #ifndef _WIN32
8 #include <sys/time.h> 8 #include <sys/time.h>
9 #else 9 #else
10 #include <windows.h> 10 #include <windows.h>
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 char fps_text[64]; 321 char fps_text[64];
322 sprintf(fps_text, "%g fps", 322 sprintf(fps_text, "%g fps",
323 kStepsPerCircle / (time_now - time_at_last_check_)); 323 kStepsPerCircle / (time_now - time_at_last_check_));
324 fps.SetProperty("innerHTML", fps_text); 324 fps.SetProperty("innerHTML", fps_text);
325 } 325 }
326 326
327 time_at_last_check_ = time_now; 327 time_at_last_check_ = time_now;
328 } 328 }
329 329
330 // Print interfaces. 330 // Print interfaces.
331 // TODO(mball,dmichael) Replace this with the PPP_PRINTING_DEV_USE_0_4 version 331 // TODO(mball,dmichael) Replace this with the PPP_PRINTING_DEV_USE_0_5 version
dmichael (off chromium) 2011/09/27 15:28:38 Oops. This is dead code now that I must have misse
vandebo (ex-Chrome) 2011/09/27 20:02:24 Done.
332 virtual PP_PrintOutputFormat_Dev* QuerySupportedPrintOutputFormats( 332 virtual PP_PrintOutputFormat_Dev* QuerySupportedPrintOutputFormats(
333 uint32_t* format_count) { 333 uint32_t* format_count) {
334 pp::Memory_Dev memory; 334 pp::Memory_Dev memory;
335 PP_PrintOutputFormat_Dev* format = 335 PP_PrintOutputFormat_Dev* format =
336 static_cast<PP_PrintOutputFormat_Dev*>( 336 static_cast<PP_PrintOutputFormat_Dev*>(
337 memory.MemAlloc(sizeof(PP_PrintOutputFormat_Dev))); 337 memory.MemAlloc(sizeof(PP_PrintOutputFormat_Dev)));
338 *format = PP_PRINTOUTPUTFORMAT_RASTER; 338 *format = PP_PRINTOUTPUTFORMAT_RASTER;
339 *format_count = 1; 339 *format_count = 1;
340 return format; 340 return format;
341 } 341 }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 }; 486 };
487 487
488 namespace pp { 488 namespace pp {
489 489
490 // Factory function for your specialization of the Module object. 490 // Factory function for your specialization of the Module object.
491 Module* CreateModule() { 491 Module* CreateModule() {
492 return new MyModule(); 492 return new MyModule();
493 } 493 }
494 494
495 } // namespace pp 495 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698