summaryrefslogtreecommitdiffstats
path: root/ppapi/examples
Commit message (Collapse)AuthorAgeFilesLines
* Fix event dispatching for PPB_Messaging::PostMessage. I asked Adam about ↵dmichael@chromium.org2011-05-131-31/+32
| | | | | | | | | | | | | | | | the "plugin.onmessage = function(x){...}" style vs the 'plugin.addEventListener' style, and it seems that we should prefer supporting the addEventListener style. This breaks the ability to do "plugin.onmessage =" :-(. I expected dispatchEvent to do it for me, but it does not. To add that support (if desired), I could work on making dispatchEvent do it, or I could fake it out via the script in MessageChannel (Basically have the old path of invoking onmessage directly, plus the new dispatchEvent code). Brett, please focus on PPAPI-specific stuff. Adam, please focus on my event code (especially message_channel.cc and the JavaScript in test_post_message.cc). BUG=None TEST=test_post_message.cc Review URL: http://codereview.chromium.org/6901060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85348 0039d316-1c4b-4281-b951-d872f2087c98
* Convert audio-related messages to the new thunk/API system for Pepper.brettw@chromium.org2011-05-131-1/+1
| | | | | | | | | | | | | | | | | | | This has a bit of a change from the previous couple of resources that were converted in that the ResourceCreationProxy now calls a static proxy function for actually doing the work. It became too complicated and required that the ResourceCreationProxy know a lot about the internals of the objects. Did a little namespace cleanup. This renames "pp::shared_impl" to just use the "ppapi" namespace. The "shared_impl" was ugly and didn't help anything. Some files in that directory used "ppapi::shared_impl" instead which was even more confusing. Do a little build cleanup. The old ppapi_shared_proxy.gypi is now split into two sub-files, one for ppapi_shared, and one for ppapi_proxy. It's hopefully easier to find stuff now. Review URL: http://codereview.chromium.org/7014024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85303 0039d316-1c4b-4281-b951-d872f2087c98
* Create a super-simple PPAPI demo plugin exercising GLES2 functionality.fischman@chromium.org2011-04-112-0/+154
| | | | | | | | | | | | Hopefully useful to future plugin authors who need to use GL as a rendering engine. BUG=none TEST=manual Review URL: http://codereview.chromium.org/6825003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81166 0039d316-1c4b-4281-b951-d872f2087c98
* Reupload of http://codereview.chromium.org/6801053/dmichael@chromium.org2011-04-082-122/+0
| | | | | | | | | | My repo got messed up. BUG=None TEST=src/ppapi/tests/test_post_message.cc Review URL: http://codereview.chromium.org/6801053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80992 0039d316-1c4b-4281-b951-d872f2087c98
* A proposal and implementation for an initial postMessage interface. These ↵dmichael@google.com2011-03-234-0/+229
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | interfaces will allow JavaScript to send data asynchronously to a module instance, and the module instance to asynchronously send data to a JavaScript message handler. Note, I did something differently from other per-instance interfaces. While the C interface has 'PPB_Messaging' and 'PPP_Messaging' separate from the Instance interfaces, I stuck the per-instance messaging in to pp::Instance. It seems more intuitive to me, and doesn't have the drawbacks of having too many functions in the C layer instance interfaces. Happy to back off of that position, but it's worth a shot. Overview: From JavaScript, you can invoke 'postMessage' on the embedded module. That results in a call to 'PPP_Messaging::HandleMessage'. From Native Code, you can invoke 'PPB_Messaging::PostMessage', which results in a call to an 'onmessage' function on the DOM element for the module instance in the JavaScript code (if one has been registered). Please see the included example or the examples in the comments of PPB_Messaging and PPP_Messaging. Restrictions: - This implementation is synchronous. A later CL will make it asynchronous. - This implementation supports only intrinsic values and strings (all types that PP_Var supports except for objects). Object & array support will come later. - This implementation only allows for 1 channel per instance. You can not expose other 'channels' or 'ports'. Future CLs will add support for MessagePorts. BUG=None TEST=test_post_message.h/.cc (This CL replaces http://codereview.chromium.org/6538028/ ) Review URL: http://codereview.chromium.org/6716005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79178 0039d316-1c4b-4281-b951-d872f2087c98
* Unbreak compilation of ppapi examples.neb@chromium.org2011-03-223-13/+13
| | | | | | | | | BUG=none TEST=Examples from ppapi/examples compile. Review URL: http://codereview.chromium.org/6676072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79025 0039d316-1c4b-4281-b951-d872f2087c98
* Implement proxying for FileRef and FileChooser.brettw@chromium.org2011-02-171-2/+2
| | | | | | | | | | This also changes the FileRef interface to remove the Query function, since there is no close function, there's no way to cancel the current request, which makes memory management of the info structure very difficult. Review URL: http://codereview.chromium.org/6519057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75331 0039d316-1c4b-4281-b951-d872f2087c98
* Move ppapi audio interface out of dev, butnfullagar@google.com2011-01-151-9/+11
| | | | | | | | | | | | for this CL, also keep the old dev interface around temporarily, to avoid tree breakage. Add sample_rate to RecommendSampleFrameCount() to the non-dev audio interface. Currently ignored, but useful information to use when we need to refine RecommendSampleFrameCount() Review URL: http://codereview.chromium.org/6279003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71527 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ppapi_example_2d.neb@chromium.org2011-01-121-5/+2
| | | | | | | | | | | Module->Instance CL missed this file. BUG= code.google.com/p/nativeclient/issues/detail?id=901 TEST=this one Review URL: http://codereview.chromium.org/6222003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71231 0039d316-1c4b-4281-b951-d872f2087c98
* Make audio example up-to-datenfullagar@google.com2011-01-111-18/+31
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6135007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71095 0039d316-1c4b-4281-b951-d872f2087c98
* Change ppapi C++ comment style into C.neb@chromium.org2010-12-201-18/+21
| | | | | | | | | | | This allows graphics 2d example to compile. BUG=none TEST=Compiling examples/2d/graphics_2d.c with NaCl works. Review URL: http://codereview.chromium.org/5997003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69725 0039d316-1c4b-4281-b951-d872f2087c98
* changes for proxy audionfullagar@google.com2010-11-251-11/+11
| | | | | | | | | | | | | - includes Darin's changes to move StreamCreated() to main thread - callback for delivering handles to proxy - changes to trusted interface BUG=none TEST=chrome/src/ppapi/examples/audio/audio.cc Review URL: http://codereview.chromium.org/5202002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67354 0039d316-1c4b-4281-b951-d872f2087c98
* Make PPAPI headers compile with C compilers (gcc on Linux & Mac and MSVS on ↵dmichael@google.com2010-11-051-54/+44
| | | | | | | | | | | | | | Windows). This includes changing bool to PP_Bool and adding a PP_INLINE macro. TEST=tests/test_c_includes.c BUG=59791,53451 The first patch set is a straight copy of http://codereview.chromium.org/4019010/show which got LGTMed when PPAPI was in its own repo, but had to be rolled back in order to include chrome changes. IMPORTANT: This change will break plugin implementations that use the C interface, and might break others as well. Review URL: http://codereview.chromium.org/4310002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65200 0039d316-1c4b-4281-b951-d872f2087c98
* Move PPAPI into the Chrome repo. The old repo wasbrettw@chromium.org2010-11-018-0/+831
http://ppapi.googlecode.com/ TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64613 0039d316-1c4b-4281-b951-d872f2087c98