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

Unified Diff: ppapi/example/example.cc

Issue 7349016: Added versioning for PPB_Core::MemAlloc and MemFree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes based on comments from dmichael Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/var.cc ('k') | ppapi/proxy/ppb_char_set_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/example/example.cc
diff --git a/ppapi/example/example.cc b/ppapi/example/example.cc
index 3eaafcd1aa681239dd7f2b5992c08bc851360440..2b5ab7629c8fb32c3c264fce66f4a0dc1bd68504 100644
--- a/ppapi/example/example.cc
+++ b/ppapi/example/example.cc
@@ -19,6 +19,7 @@
#include "ppapi/c/pp_errors.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/cpp/completion_callback.h"
+#include "ppapi/cpp/dev/memory_dev.h"
#include "ppapi/cpp/dev/scriptable_object_deprecated.h"
#include "ppapi/cpp/graphics_2d.h"
#include "ppapi/cpp/image_data.h"
@@ -327,12 +328,13 @@ 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 =
- reinterpret_cast<PP_PrintOutputFormat_Dev*>(
- pp::Module::Get()->core()->MemAlloc(
- sizeof(PP_PrintOutputFormat_Dev)));
+ static_cast<PP_PrintOutputFormat_Dev*>(
+ memory.MemAlloc(sizeof(PP_PrintOutputFormat_Dev)));
*format = PP_PRINTOUTPUTFORMAT_RASTER;
*format_count = 1;
return format;
« no previous file with comments | « ppapi/cpp/var.cc ('k') | ppapi/proxy/ppb_char_set_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698