summaryrefslogtreecommitdiffstats
path: root/content/ppapi_plugin
Commit message (Collapse)AuthorAgeFilesLines
* Convert the pp::proxy namespace to the ppapi::proxy namespace.brettw@chromium.org2011-08-187-19/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is more consistent with the stuff in shared_impl, and removes a lot of namespace using goop. Add a unified resource tracker shared between the proxy and the impl. This renames the old ResourceObjectBase to Resource and removes the old PluginResource. It moves the resource tracker from the impl to the shared_impl, and makes the proxy use it. Some things become a little less neat because there's no proxy resource base class. In particular GetDispatcher() is now gone. I considered whether to add a helper base class that provides this function, but decided against it and had individual resource classes implement this when their implementation would find it useful. This is because ultimately I want more of this functionality to move into the shared_impl, and it's easier to do that if there are fewer proxy-specific things in the resources. This changes the way that plugins are added to the tracker. Previously they would only be in the tracker if the plugin had a reference to them, although they could be alive if the impl had a scoped_ptr referencing an object. This actually has the bug that if we then give the resource back to the plugin, it wouldn't be refcounted properly and everything would get confused. Now the tracker tracks all live resource objects whether or not the plugin has a ref. This works basically like the var tracker (it would be nice if the var and resource trackers shared more code, but that would further complicate this already overcomplicated patch). The resource tracker takes an extra ref whenever the plugin has one or more, and otherwise just tracks live resources. BUG= TEST= Review URL: http://codereview.chromium.org/7655002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97367 0039d316-1c4b-4281-b951-d872f2087c98
* Implement PPB_Flash_TCPSocket.InitiateSSL.yzshen@chromium.org2011-08-161-0/+2
| | | | | | | | | | BUG=None TEST=None Review URL: http://codereview.chromium.org/7535007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@97005 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Remove old version of loadFont()jeremy@chromium.org2011-08-041-11/+0
| | | | | | | | | | | | | Now that the API has changed in WebKit, we can safely remove the old version of loadFont() on the Chromium side. BUG=72727 TEST=Chrome should compile. TBR=mark Review URL: http://codereview.chromium.org/7566038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95437 0039d316-1c4b-4281-b951-d872f2087c98
* Proxy PPP_Messaging.dmichael@chromium.org2011-08-031-1/+1
| | | | | | | | | | | I added a couple of tests while I was figuring out the ref counting problem I was having. Also lots of bonus spelling fixes. BUG=86123 TEST=ppp_messaging_proxy_test and ppapi_tests Review URL: http://codereview.chromium.org/7531003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95240 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Add missing interface needed to land WebKit side of crbug.com/72727jeremy@chromium.org2011-08-031-0/+12
| | | | | | | | | | | | | | | Update PPAPI sandbox interface so we can land the WebKit side of this bug. The interface was updated as part of r87282 . BUG=72727 TEST=No way to test TBR=vtl Review URL: http://codereview.chromium.org/7564005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95228 0039d316-1c4b-4281-b951-d872f2087c98
* Hook GetUserDefaultLCID () to prevent crashes on attempting to connect to ↵jschuh@chromium.org2011-08-021-1/+9
| | | | | | | | | | CSRSS after lockdown. BUG=91216 TEST=None. Review URL: http://codereview.chromium.org/7541034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95144 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up the network status notifications to out-of-process Pepper plugins.brettw@chromium.org2011-07-142-0/+12
| | | | | | | | | | This is not implemented for in-process plugins. That requires a completely separate implementation and isn't required now. TEST=manual Review URL: http://codereview.chromium.org/7357007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92477 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land the reverted CL:yzshen@chromium.org2011-07-012-1/+53
| | | | | | | | | | | | | | http://src.chromium.org/viewvc/chrome?view=rev&revision=91150 Comparing with the previous CL, this CL makes changes to ppapi/proxy/ppapi_proxy_test.{h,cc} TEST=None BUG=None Review URL: http://codereview.chromium.org/7210030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91310 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 91150 - Define PPB_Flash_TCPSocket and PPB_Flash_SSLSocket.dpapad@chromium.org2011-06-302-53/+1
| | | | | | | | | | | | TEST=None BUG=None Review URL: http://codereview.chromium.org/7191005 TBR=yzshen@chromium.org Review URL: http://codereview.chromium.org/7293001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91153 0039d316-1c4b-4281-b951-d872f2087c98
* Define PPB_Flash_TCPSocket and PPB_Flash_SSLSocket.yzshen@chromium.org2011-06-302-1/+53
| | | | | | | | | TEST=None BUG=None Review URL: http://codereview.chromium.org/7191005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91150 0039d316-1c4b-4281-b951-d872f2087c98
* Fix Pepper plugin sandbox interface for out-of-process plugin.kochi@chromium.org2011-06-301-1/+2
| | | | | | | | | | | | | | | | | | | | On Chrome OS Flash player is running out-of-process by default, and it is failing to handle font fallback because in PpapiWebkitClientImpl SandboxSupport object is not instantiated. Without SandboxSupport instance, all the font related requests are handled locally, and fail to communicate with Fontconfig because it is sandboxed. Instantiating SandboxSupport will properly route font related requests to Sandbox IPC process to communicate to Fontconfig. BUG=87039, chromium-os:15882 TEST=Set Chrome OS to English UI and open http://weathernews.jp to see if all the characters are rendered properly. Review URL: http://codereview.chromium.org/7273062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91076 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: base/scoped_ptr.h -> base/memory/scoped_ptr.h. (part 2)thestig@chromium.org2011-06-151-1/+1
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/7149008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89131 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Make PPAPI plugins work out of process (i.e., with a proxy) and a sandbox.viettrungluu@chromium.org2011-06-142-0/+34
| | | | | | | | | | | | | | Also make sure that --no-sandbox works correctly in disabling the sandbox for the PPAPI plugin process. BUG=none TEST=Mac Flapper works out of process (at least for some content). \ --no-sandbox also works correctly in disabling the sandbox for the PPAPI \ process. Review URL: http://codereview.chromium.org/6979022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89058 0039d316-1c4b-4281-b951-d872f2087c98
* roll clang 131935:132017thakis@chromium.org2011-06-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clang recently added a warning that warns when invoking 'delete' on a polymorphic non-final class without a virtual destructor. This finds real bugs – see the bug referenced below for a few examples. However, one common pattern where it fires is this case: class SomeInterface { public: virtual void interfaceMethod() {} // or = 0; protected: ~SomeInterface() {} } class WorkerClass : public SomeInterface { public: // many non-virtual functions, but also: virtual void interfaceMethod() override { /* do actual work */ } }; void f() { scoped_ptr<WorkerClass> c(new WorkerClass); // simplified example } (See the 2nd half of http://www.gotw.ca/publications/mill18.htm for an explanation of this pattern.) It is arguably correct to fire the warning here, since someone might make a subclass of WorkerClass and replace |new WorkerClass| with |new WorkerClassSubclass|. This would be broken since WorkerClass doesn't have a virtual destructor. The solution that the clang folks recommend is to mark WorkerClass as |final| (a c++0x keyword that clang supports as an extension in normal c++ mode – like override). But chrome's base/OWNERS deemed that as too complicated and we decided to make virtual the destructors of leaf classes that implement these interfaces and that are deleted dynamically. All of the changes in this CL are to shut up the warning, not because of real problems (I fixed these in separate CLs). (For the gtk files, this is necessary because the CHROMEGTK_CALLBACK_ macros add virtual functions.) BUG=84424 TEST=none Review URL: http://codereview.chromium.org/7087028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88270 0039d316-1c4b-4281-b951-d872f2087c98
* Replace OS_LINUX ifdefs with OS_POSIX & !OS_MACOSX, TOOLKIT_USES_GTK, ortony@chromium.org2011-05-311-3/+3
| | | | | | | | | | | USE_X11 where possible. An earlier version of this patch was used to build Chromium on FreeBSD, OpenBSD, and Solaris. Patch by ruben (chromium@hybridsource.org) Review URL: http://codereview.chromium.org/7006006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87382 0039d316-1c4b-4281-b951-d872f2087c98
* Move OWNERS from top level of content to the subdirectories. Before this ↵jam@chromium.org2011-05-311-0/+2
| | | | | | | | change, there were 12 OWNERS under content other than the top-level one (which is a good thing), but those OWNERS couldn't approve adding or removing files. Review URL: http://codereview.chromium.org/7085021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87313 0039d316-1c4b-4281-b951-d872f2087c98
* Use the WebKit default fonts when specifying generic font families.brettw@chromium.org2011-05-261-7/+8
| | | | | | | | | | | | | This pipes through a new preferences object that the font system can use. It now picks up these faces as well as the default font size. Clarify this behavior in the interface. TEST=manual (font example included). BUG=none Review URL: http://codereview.chromium.org/7053022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86870 0039d316-1c4b-4281-b951-d872f2087c98
* Virtual destructors should have virtual keyword.hans@chromium.org2011-05-251-1/+1
| | | | | | | | | | | | | | | | | Make sure user-declared virtual destructors always have the virtual keyword. The Clang style-check plugin will check for this soon. No functionality change: virtual is only added to destructors that are already implicitly virtual. Also fix a couple of in-line destructor definitions. BUG=83408 TEST=none Review URL: http://codereview.chromium.org/7064033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86587 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_temp_dir and scoped_native_library back from base/memory to base.thakis@chromium.org2011-05-191-2/+2
| | | | | | | | | | | It looks like they got moved accidentally in http://codereview.chromium.org/6714032 BUG=none TEST=none Review URL: http://codereview.chromium.org/7048007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86010 0039d316-1c4b-4281-b951-d872f2087c98
* Support getting the font list in Pepper. This currently only works out ofbrettw@chromium.org2011-05-182-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | process. This adds a function to the font interface to get the font list. Since we don't have arrays or dictionaries in Pepper yet, I used a string with nulls separating the names. A previous attempt to make a "font list resource" proved excessively complicated and not actually much easier for clients to deal with. This refactors the existing font list getting that used to be in the options for the browser. I moved it to content and split it into two pieces, the synchronous version, and then an asynchronous wrapper around that which both the prefs code and the pepper code use. This cleaned up some of the preferences code, and also fixes the leak of the entire font list in the code. I used the new callback/bind system for the async font loading. I had to add BrowserThread support for the new system. This uses the PepperMessageFilter to listen for font load requests from the plugin in the browser process. This is nice because we can add stuff here and have messages serviced for both in-process and out-of-process plugins. This proved to be complicated due to the HostResolver used in some of the existing code, and thread restrictions for how to deal with it. This is why there are two modes for the filter object. I changed the delegates around for the Dispatcher. Now the PluginDispatcher has the delegate interface since the HostDispatcher didn't actually need any of them and we were accumulating a lot of empty functions in the PepperPluginRegistry. It's possible for the fonts to be loaded on Windows and Mac without IPC, since enumerating fonts should be possible inside the sandbox. I didn't implement this since it adds extra complexity and probably doesn't give that much benefit. TEST=manual BUG=none Review URL: http://codereview.chromium.org/7044012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85827 0039d316-1c4b-4281-b951-d872f2087c98
* Change the PPAPI message loop to type IO (from type UI).viettrungluu@chromium.org2011-05-171-1/+1
| | | | | | | | | | | UI message pumps are special on Mac and won't work. BUG=none TEST=out-of-process Flapper continues to work on Linux and dies later on Mac Review URL: http://codereview.chromium.org/7036024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85690 0039d316-1c4b-4281-b951-d872f2087c98
* Convert audio-related messages to the new thunk/API system for Pepper.brettw@chromium.org2011-05-132-3/+3
| | | | | | | | | | | | | | | | | | | 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
* Make the Pepper proxy support in-process font rendering.brettw@chromium.org2011-05-106-0/+422
| | | | | | | | | | | | | This implements a WebKit thread in the PPAPI plugin process so we can do the font calls without IPC. The existing font support was refactored into a virtual class (to prevent PPAPI from depending on WebKit and creating a circular GYP dependency). This moves the renderer sandbox support into content/common so that it can be used by the PPAPI process. Review URL: http://codereview.chromium.org/6981001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84856 0039d316-1c4b-4281-b951-d872f2087c98
* iwyu: Include stringprintf.h where appropriate, part 1.jhawkins@chromium.org2011-05-101-0/+1
| | | | | | | | | | | BUG=82098 TEST=none R=thakis@chromium.org Review URL: http://codereview.chromium.org/6997006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84754 0039d316-1c4b-4281-b951-d872f2087c98
* Make Pepper work out-of-process in the windows sandboxcpu@chromium.org2011-05-062-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | Fixes the following issues - Propper sandbox lockdown - Rand support and the Pepper module now load - Pipe creation failed - Specific sandbox policy crafted for pepper - Can now debug child process Note, the example plugin manages to draw at least a frame, then it crashes in some other unrelated bug. To test use chrome with: --register-pepper-plugins="<blah>\ppapi_example.dll;application/x-ppapi-example" --ppapi-out-of-process And can use --ppapi-startup-dialog, which hangs until you connect the debugger BUG=none TEST= see above. Review URL: http://codereview.chromium.org/6930059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84520 0039d316-1c4b-4281-b951-d872f2087c98
* Add a way to pass information to Pepper Flash from the command-line (e.g., ↵viettrungluu@chromium.org2011-05-031-0/+5
| | | | | | | | | | | | | | for debugging). This also adds a |ProxyModule| singleton object to the Pepper proxy, which we may eventually use for communicating directly with the browser. BUG=none TEST=none Review URL: http://codereview.chromium.org/6910007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83932 0039d316-1c4b-4281-b951-d872f2087c98
* Switch IPC::ChannelProxy to use MessageLoopProxy instead of MessageLoop. ↵jam@chromium.org2011-05-022-3/+3
| | | | | | | | This allows us to remove usage of the IOThread object, and generally makes IPC::ChannelProxy more robust for future uses. Review URL: http://codereview.chromium.org/6901146 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83741 0039d316-1c4b-4281-b951-d872f2087c98
* Fix two bugs in proxying of Broker Connect callback and shutdown Broker when ↵ddorwin@chromium.org2011-04-182-2/+2
| | | | | | | | | | | renderer exits. BUG=none TEST=none Review URL: http://codereview.chromium.org/6882020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82017 0039d316-1c4b-4281-b951-d872f2087c98
* linux: don't always print dlopen errors from LoadNativeLibraryevan@chromium.org2011-04-181-1/+1
| | | | | | | | | | | Instead, return them to the caller and let the caller decide whether the error is worth notifying the user about. BUG=79068 Review URL: http://codereview.chromium.org/6864020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82008 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure no chrome includes in content\common and content\ppapi_plugin. Also ↵jam@chromium.org2011-04-183-2/+3
| | | | | | | | tighten a little in device_orientation. Review URL: http://codereview.chromium.org/6883022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82001 0039d316-1c4b-4281-b951-d872f2087c98
* Refactored ppapi Dispatcher to share common code between the plugin and ↵ddorwin@chromium.org2011-04-164-16/+86
| | | | | | | | | | | | | broker dispatchers. Common code is in DispatcherBase. The base of the dispatcher for plugins remains Dispatcher. The base of the dispatcher for Brokers is BrokerDispatcher. BUG=none TEST=ppapi out-of-process plugins Review URL: http://codereview.chromium.org/6859003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81883 0039d316-1c4b-4281-b951-d872f2087c98
* Added ppp_broker.h and parameterized PpapiThread to support the broker process.ddorwin@chromium.org2011-04-144-40/+81
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6813071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81524 0039d316-1c4b-4281-b951-d872f2087c98
* Clarify the ownership of the dispatcher when we create it. Delete it ifbrettw@chromium.org2011-04-101-3/+7
| | | | | | | | initialization fails (up until now, init can't fail, so this didn't end up being a real leak). Review URL: http://codereview.chromium.org/6821019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81054 0039d316-1c4b-4281-b951-d872f2087c98
* Basic support for ppapi trusted broker process: --type=ppapi-broker.ddorwin@chromium.org2011-04-073-31/+29
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6803016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80792 0039d316-1c4b-4281-b951-d872f2087c98
* Fix double close in PPAPI proxypiman@google.com2011-04-061-1/+2
| | | | | | | | | BUG=none TEST=using OOP pepper flash, open a flash site, close the page, check no warning of failing close Review URL: http://codereview.chromium.org/6691070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80719 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Move ppapi_plugin to content.jam@chromium.org2011-03-148-0/+328
TBR=brettw Review URL: http://codereview.chromium.org/6679041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78042 0039d316-1c4b-4281-b951-d872f2087c98