From 47a961c13f61cdbd00a7020a5a8173586a8ed892 Mon Sep 17 00:00:00 2001 From: "brettw@chromium.org" Date: Fri, 13 Jul 2012 19:18:52 +0000 Subject: Add support for threadsafe completion callback factory. This also makes the default be threadsafe. The old factory wasn't threadsafe even to the extent claimed in the header which was causing hangs in plugins BUG=136284 Review URL: https://chromiumcodereview.appspot.com/10696157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146611 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/examples/audio_input/audio_input.cc | 6 ++++++ ppapi/examples/scripting/post_message.cc | 6 ++++++ ppapi/examples/url_loader/streaming.cc | 6 ++++++ ppapi/examples/video_capture/video_capture.cc | 6 ++++++ 4 files changed, 24 insertions(+) (limited to 'ppapi/examples') diff --git a/ppapi/examples/audio_input/audio_input.cc b/ppapi/examples/audio_input/audio_input.cc index d597b76..a216d54 100644 --- a/ppapi/examples/audio_input/audio_input.cc +++ b/ppapi/examples/audio_input/audio_input.cc @@ -20,6 +20,12 @@ #include "ppapi/cpp/size.h" #include "ppapi/utility/completion_callback_factory.h" +// When compiling natively on Windows, PostMessage can be #define-d to +// something else. +#ifdef PostMessage +#undef PostMessage +#endif + class MyInstance : public pp::Instance { public: explicit MyInstance(PP_Instance instance) diff --git a/ppapi/examples/scripting/post_message.cc b/ppapi/examples/scripting/post_message.cc index 24f7927..636a7a8 100644 --- a/ppapi/examples/scripting/post_message.cc +++ b/ppapi/examples/scripting/post_message.cc @@ -8,6 +8,12 @@ #include "ppapi/cpp/module.h" #include "ppapi/cpp/var.h" +// When compiling natively on Windows, PostMessage can be #define-d to +// something else. +#ifdef PostMessage +#undef PostMessage +#endif + // This is a simple C++ Pepper plugin that demonstrates HandleMessage and // PostMessage. diff --git a/ppapi/examples/url_loader/streaming.cc b/ppapi/examples/url_loader/streaming.cc index 80ee4f0..18efe68 100644 --- a/ppapi/examples/url_loader/streaming.cc +++ b/ppapi/examples/url_loader/streaming.cc @@ -18,6 +18,12 @@ #include "ppapi/cpp/url_response_info.h" #include "ppapi/utility/completion_callback_factory.h" +// When compiling natively on Windows, PostMessage can be #define-d to +// something else. +#ifdef PostMessage +#undef PostMessage +#endif + // Buffer size for reading network data. const int kBufSize = 1024; diff --git a/ppapi/examples/video_capture/video_capture.cc b/ppapi/examples/video_capture/video_capture.cc index 07239c6..25d2ef0 100644 --- a/ppapi/examples/video_capture/video_capture.cc +++ b/ppapi/examples/video_capture/video_capture.cc @@ -25,6 +25,12 @@ #include "ppapi/lib/gl/include/GLES2/gl2.h" #include "ppapi/utility/completion_callback_factory.h" +// When compiling natively on Windows, PostMessage can be #define-d to +// something else. +#ifdef PostMessage +#undef PostMessage +#endif + // Assert |context_| isn't holding any GL Errors. Done as a macro instead of a // function to preserve line number information in the failure message. #define assertNoGLError() \ -- cgit v1.1