summaryrefslogtreecommitdiffstats
path: root/ppapi/examples
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 19:18:52 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-07-13 19:18:52 +0000
commit47a961c13f61cdbd00a7020a5a8173586a8ed892 (patch)
treea89ea8f0c81f5c74cb5bcaf852e4e83ab21fbc75 /ppapi/examples
parent8367f7b3aab8365ed5e696e4720a2a416d956d0a (diff)
downloadchromium_src-47a961c13f61cdbd00a7020a5a8173586a8ed892.zip
chromium_src-47a961c13f61cdbd00a7020a5a8173586a8ed892.tar.gz
chromium_src-47a961c13f61cdbd00a7020a5a8173586a8ed892.tar.bz2
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
Diffstat (limited to 'ppapi/examples')
-rw-r--r--ppapi/examples/audio_input/audio_input.cc6
-rw-r--r--ppapi/examples/scripting/post_message.cc6
-rw-r--r--ppapi/examples/url_loader/streaming.cc6
-rw-r--r--ppapi/examples/video_capture/video_capture.cc6
4 files changed, 24 insertions, 0 deletions
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() \