summaryrefslogtreecommitdiffstats
path: root/chrome/common/pepper_plugin_registry.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move PepperPluginRegistry to content, while leaving the Chrome specific bits ↵jam@chromium.org2011-04-181-433/+0
| | | | | | | | (NaCl, registration of Chrome plugins like pdf/remoting/flash) behind. Review URL: http://codereview.chromium.org/6869051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81959 0039d316-1c4b-4281-b951-d872f2087c98
* Wire up the extension API for registering NaCl modules to an actual registry ↵abarth@chromium.org2011-04-141-1/+85
| | | | | | | | of NaCl modules. Review URL: http://codereview.chromium.org/6821038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81545 0039d316-1c4b-4281-b951-d872f2087c98
* Fix out-of-process pepper plugins when sandbox is on.piman@google.com2011-04-011-1/+1
| | | | | | | | | | | | Also make --ppapi-flash-in-process accessible and useful on Chrome OS. BUG=none TEST=check in about:flags on Chrome OS, go to youtube on Chrome OS, with or without the flag. Review URL: http://codereview.chromium.org/6764003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80187 0039d316-1c4b-4281-b951-d872f2087c98
* Default Pepper Flash to running out-of-process, with a command-line option tobrettw@chromium.org2011-03-311-1/+5
| | | | | | | | | | force it to run in-process. TEST=manual BUG=none Review URL: http://codereview.chromium.org/6780026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80071 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up the sad plugin painting and the crashed plugin infobars forbrettw@chromium.org2011-03-191-1/+1
| | | | | | | | | | | | | | | | out-of-process PPAPI plugins. This mostly just forwards notifications up and provides a way to get the sad plugin image in the PPAPI rendering code. I moved the NPAPI sad tab painting to a new file so that it could be shared between the NPAPI and PPAPI. This also hooks up the name and version information in the task manager for PPAPI plugins. R=jam@chromium.org Review URL: http://codereview.chromium.org/6685091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78816 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure that PP_Instance values are unique within a plugin process in additionbrettw@chromium.org2011-03-101-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | to within the renderer. This works by having the renderer check with the plugin that a PP_Instance is available before using it. If it's already seen, the renderer will generate a new PP_Instance and retry. For performance, this message is handled on the I/O thread of the plugin so it will not be blocked by the actual plugin code. This requires an unfortunate amount of plumbing. Since the renderer can't depend directly on the proxy, we have a new PPB_Proxy function to set the verification function used to perform this check. There is also a new plugin dispatcher delegate where I moved some of the global state to that used to go into the init function. Adding yet another parameter there seemed unfortunate. TEST=manual BUG=74961 Review URL: http://codereview.chromium.org/6628019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77693 0039d316-1c4b-4281-b951-d872f2087c98
* Pepper/Flash: Add command line args specifically for Pepper Flash.viettrungluu@chromium.org2011-03-081-3/+54
| | | | | | | | | | | This allows us to properly specify MIME types, extensions, etc. BUG=none TEST=none Review URL: http://codereview.chromium.org/6650004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77364 0039d316-1c4b-4281-b951-d872f2087c98
* Pepper: Store file extensions and description on a per-mime-type basis.viettrungluu@chromium.org2011-03-081-12/+19
| | | | | | | | | | | | Also eliminate stupid and unnecessary conversion of data to a big string, only to be parsed back. BUG=none TEST=everything still works Review URL: http://codereview.chromium.org/6635009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77215 0039d316-1c4b-4281-b951-d872f2087c98
* Fix enable/disable of the Chrome Pepper Nacl plug-in. On Linux, the Zygote ↵bbudge@google.com2011-03-031-19/+14
| | | | | | | | | | loads plugins before all command line information is available. In particular, the about:flags flag for NaCl isn't loaded yet. The fix is to always load the plugin and have the PluginService check the command line flags and set the WebPluginInfo.enabled field based on that. TEST=manual BUG=71989 Review URL: http://codereview.chromium.org/6610005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76779 0039d316-1c4b-4281-b951-d872f2087c98
* Don't use crashed plugins when instantiating new ones. Before, when a pluginbrettw@chromium.org2011-02-271-3/+6
| | | | | | | | | | | | | crashed and was still referenced by a plugin in the same renderer, it would try to re-use the crashed one, which obviously doesn't work very well. This change removes crashed plugins from the renderer's list. TEST=Manual: instantiate two tabs sharing the same renderer using a plugin, kill the plugin, then reload one of the tabs. BUG=none Review URL: http://codereview.chromium.org/6594036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76194 0039d316-1c4b-4281-b951-d872f2087c98
* Add ability to pass version for pepper pluginspiman@google.com2011-02-161-2/+6
| | | | | | | | | BUG=chromium-os:12139 TEST=run with "--register-pepper-plugins=$FLASH_ROOT/out/$FLASH_TYPE/libpepflashplayer.so#Shockwave Flash#Shockwave Flash 10.1 r103#10.1 r103;application/x-shockwave-flash" and check that the version shows up in about:plugins, and that the flash plugin is correctly attached to the Flash group.% Review URL: http://codereview.chromium.org/6525040 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75166 0039d316-1c4b-4281-b951-d872f2087c98
* Revert all the reverts and partial re-lands of r73427. Fix the startup perf ↵brettw@google.com2011-02-061-95/+77
| | | | | | | | regression from that patch by properly using the command line switch for enabling NaCl. Review URL: http://codereview.chromium.org/6334141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73957 0039d316-1c4b-4281-b951-d872f2087c98
* Add check for NaCl being enabled which got lost in my refactoring of thebrettw@chromium.org2011-02-061-1/+2
| | | | | | | | PluginRegistry and is likely the cause of the startup regressions. Review URL: http://codereview.chromium.org/6413011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73944 0039d316-1c4b-4281-b951-d872f2087c98
* Part 3 of re-landing r73427. This moves the built-in plugin computation to a ↵brettw@google.com2011-02-061-93/+84
| | | | | | | | static funciton and combines the extra and internal plugins. Review URL: http://codereview.chromium.org/6334140 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73943 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land more changes from r73427 where we set the name for each module in ↵brettw@google.com2011-02-051-18/+18
| | | | | | | | the constructor (checking for perf regressions). Review URL: http://codereview.chromium.org/6312177 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73934 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the build, previous patch had a typo.brettw@chromium.org2011-02-051-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73933 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land part of r73427 where the plugin info and internal plugin info are ↵brettw@google.com2011-02-051-25/+13
| | | | | | | | unified (checking for perf regressions). Review URL: http://codereview.chromium.org/6413009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73932 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 73427 (set the name of the PPAPI plugin correcetly) and 73916 (minor ↵brettw@google.com2011-02-051-134/+173
| | | | | | | | | bugfix) to see if it is responsible for the startup performance regression. TEST=startup perf XP Review URL: http://codereview.chromium.org/6368120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73931 0039d316-1c4b-4281-b951-d872f2087c98
* Remove double-initialization for plugin modules.brettw@google.com2011-02-051-2/+0
| | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/6250179 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73916 0039d316-1c4b-4281-b951-d872f2087c98
* ifdef out kRemotingPluginMimeType to fix Chromium Linux Redux build.johnme@google.com2011-02-031-0/+2
| | | | | | | | | | | ifdef out kRemotingPluginMimeType introduced by commit 499e891bb2de3cd345064ef09a24991c3af984b8 (http://codereview.chromium.org/6246031) to fix Chromium Linux Redux fatal warning "chrome/common/pepper_plugin_registry.cc:30: error: <unnamed>::kRemotingPluginMimeType defined but not used". BUG=none TEST=none Review URL: http://codereview.chromium.org/6349073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73671 0039d316-1c4b-4281-b951-d872f2087c98
* Set the name of the PPAPI plugin properly when running out of process. Thisbrettw@chromium.org2011-02-021-177/+138
| | | | | | | | also does some refactoring of the plugin registry to make it more clear and to avoid recomputilg the plugin list all the time. Review URL: http://codereview.chromium.org/6246031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73427 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the internal-nacl flag.sehr@google.com2011-02-011-7/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/6250050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73252 0039d316-1c4b-4281-b951-d872f2087c98
* Fix pepper plugin description regressionpiman@google.com2011-01-261-1/+3
| | | | | | | | | | | | | CL http://codereview.chromium.org/6162008 broke descriptions for pepper plugins. This puts it back to the previous state (we don't have a way to separately give mime type descriptions vs plugin descriptions) BUG=cros:11298 TEST=Flash on CNN Review URL: http://codereview.chromium.org/6327019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72569 0039d316-1c4b-4281-b951-d872f2087c98
* Make PP_Resources associated with the Instance rather than the module. Thisbrettw@chromium.org2011-01-151-1/+3
| | | | | | | | | | | | | | | | | | | | | | adds PP_Instance to the necessary places in the API to make this possible. String and Object vars used to be PP_Resources. But it is not practical to assocaited strings with an instance since then we can't have implicit var constructors and have to litter every string with an instance. So this changes vars to use their own tracking system associated with the module (i.e. keeping the current semantics) and making it no longer a resource. I made the internal Var IDs 32 bits since Neb is about to land his 64->32 change. Now it force-deletes resources associated with an instance when that instance goes away. I added some additional code and tracking in ResourceTracker to do this. I could then remove the Instance::Observer class since the resource can use the (now renamed) StoppedTracking to know that it's being deleted in response to the instance being destroyed. TEST=ppapi ui tests BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71544 0039d316-1c4b-4281-b951-d872f2087c98
* Adds the x-nacl to the MIME types recognized by the Pepper NaCl plug-in. ↵bbudge@google.com2011-01-111-1/+7
| | | | | | | | | | Another CL will remove the old MIME type (x-ppapi-nacl-srpc) after the NaCl tree has been updated, to avoid a window where NaCl is broken. BUG=none TESTS=manual Review URL: http://codereview.chromium.org/6117005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71094 0039d316-1c4b-4281-b951-d872f2087c98
* Re-use existing out-of-process plugins if one is already loaded. Otherwisebrettw@chromium.org2011-01-041-9/+40
| | | | | | | | | | | | | | | | | | | | | | | sites with multiple plugins will load that many child processes, which is bad. This works by having creators of out-of-process plugins add it to a list in the PepperPluginRegistry. The items are deleted from this list by a new delegate implementation for the module to tell the registry that it's being destroyed. It's a little awkward since the PluginModule can't know about the PepperPluginRegistry, and all other pepper "delegates" are associated with the Instance/RenderView, so by definition can't be used when the module is being torn down since there are no instances. It might have been nice to have an Add function on the lifetime delegate so that the module will add itself to the list. But the plugin path name is currently not available in all code paths, and it seemed messy to add. TEST=manual BUG=none Review URL: http://codereview.chromium.org/6085007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70457 0039d316-1c4b-4281-b951-d872f2087c98
* Move the Pepper implementation from webkit/glue/plugins/pepper_* tobrettw@chromium.org2010-12-161-3/+3
| | | | | | | | | | | webkit/plugins/ppapi/*. This renamed the files and interface implementation classes from foo.cc/Foo to ppb_foo_impl/PPB_Foo_Impl to match the proxy ppb_foo_proxy/PPB_Foo_Proxy. This moves plugin_switches.* from webkit/glue/plugins to webkit/plugins. Review URL: http://codereview.chromium.org/5828003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69424 0039d316-1c4b-4281-b951-d872f2087c98
* Update pepper registry of internal plugins.abarth@chromium.org2010-12-151-0/+29
| | | | | | | | | | | | | | | | Added constants for NaCl. Register plugin (only if --enable-nacl) BUG= http://code.google.com/p/nativeclient/issues/detail?id=933 TEST=none Original patch by Noel Allen. Review URL: http://codereview.chromium.org/5848001/ git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69290 0039d316-1c4b-4281-b951-d872f2087c98
* Make webkit/glue/plugins no longer depend on ppapi/proxy directly. This causesbrettw@chromium.org2010-12-081-5/+4
| | | | | | | | | | | | | things that use webkit but otherwise don't need IPC to include the IPC directory. This patch moves the set-up of the proxy into the renderer. I also did a lot of clean-up of the initialization and it seems much nicer now. BUG=63684 TEST=manual PPAPI proxy testing git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68567 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 68482 - Make webkit/glue/plugins no longer depend on ppapi/proxy ↵brettw@chromium.org2010-12-071-4/+5
| | | | | | | | | | | | | | | | | | | directly. This causes things that use webkit but otherwise don't need IPC to include the IPC directory. This patch moves the set-up of the proxy into the renderer. I also did a lot of clean-up of the initialization and it seems much nicer now. BUG=63684 TEST=manual PPAPI proxy testing Review URL: http://codereview.chromium.org/5592005 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/5616004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68486 0039d316-1c4b-4281-b951-d872f2087c98
* Make webkit/glue/plugins no longer depend on ppapi/proxy directly. This causesbrettw@chromium.org2010-12-071-5/+4
| | | | | | | | | | | | | | things that use webkit but otherwise don't need IPC to include the IPC directory. This patch moves the set-up of the proxy into the renderer. I also did a lot of clean-up of the initialization and it seems much nicer now. BUG=63684 TEST=manual PPAPI proxy testing Review URL: http://codereview.chromium.org/5592005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68482 0039d316-1c4b-4281-b951-d872f2087c98
* Pepper: leak the plugin registryevan@chromium.org2010-12-021-2/+6
| | | | | | | | | | Leaking this is better than poking into bad memory on shutdown. BUG=63234 Review URL: http://codereview.chromium.org/5556002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68045 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: Let out-of-process tests run in bundled mode for their whole lifetime.thakis@chromium.org2010-11-151-1/+1
| | | | | | | | | | | | | | | | | | | Since out-of-process tests override the EXE path to look like the bundled app, it makes sense to override AmIBundled() as well. This is important because the renderer process started from browser_tests runs as bundled, and if browser and renderer process don't agree on bundled-ness, the "load plugin" requests for internal plugins from the renderer have the wrong plugin path, causing the plugin load to fail. Also add a DCHECK that makes sure that AmIBundled() doesn't flip-flop. This makes PDFBrowserTest work on mac, so enable it. It looks like even unit_tests uses the out-of-process test runner, so this change is a bit hairy :-/ BUG=61258,63183 TEST=all existing tests still pass, PDFBrowserTest.* passes. Review URL: http://codereview.chromium.org/4947002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66156 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a new process type for running PPAPI plugins. The process itself isbrettw@chromium.org2010-11-101-2/+25
| | | | | | | | | | | | | | | quite simple and just sets up the PPAPI dispatcher and loads the library. There is a new command line switch --ppapi-out-of-process which runs PPAPI plugins out of process using the new code path. There is some logic in RenderView and PepperPluginModule for setting up this connection, but it should be straightforward. TEST=none BUG=none Review URL: http://codereview.chromium.org/3915002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65614 0039d316-1c4b-4281-b951-d872f2087c98
* Support sync file io for pepper, to support LSOspiman@chromium.org2010-10-191-0/+2
| | | | | | | | | BUG=chromium-os:7492 TEST=run pepper flash (with LSO support) on http://www.bestflashanimationsite.com/tutorials/4/ , check that it properly stores the objects. Review URL: http://codereview.chromium.org/3800010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63003 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move SplitString functions into the base namespace and update the callers.tfarina@chromium.org2010-10-141-3/+3
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3750001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62483 0039d316-1c4b-4281-b951-d872f2087c98
* Fix bug with enabling/disabling the pdf plugin, related to plugin grouping work.jam@chromium.org2010-10-071-4/+10
| | | | | | | BUG=58329 Review URL: http://codereview.chromium.org/3618015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61864 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Continue fixing nits found by my automated source scanner.erg@google.com2010-10-051-0/+4
| | | | | | | | | | | (~1.3 megs off Debug linux .a files) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3556013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61587 0039d316-1c4b-4281-b951-d872f2087c98
* base: Finish moving the SplitString functions from string_util.h to ↵tfarina@chromium.org2010-09-241-0/+1
| | | | | | | | | | | string_split.h BUG=None TEST=trybos Review URL: http://codereview.chromium.org/3447008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60422 0039d316-1c4b-4281-b951-d872f2087c98
* Fix "missing plugin" error in linux chrome.gene@chromium.org2010-08-111-14/+13
| | | | | | | | | | | | | | On linux first check succeeded, while next one will fail and no plugin information got returned. So, I am inverting logic a little bit. IFF check for plugin file succeeded, we omit all subsequent for this file in the process. BUG=none TEST=Check PDF plugin is working in Chrome linux sandbox, and no PDF plugin is in Chromium build. Review URL: http://codereview.chromium.org/3181003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55784 0039d316-1c4b-4281-b951-d872f2087c98
* pepper: don't warn if PDF plugin is unavailableevan@chromium.org2010-08-101-4/+12
| | | | | | | | | | | | | | | We preload plugins before we sandbox, then later attempt to fully load them once we're sandboxed. We can't ask whether the plugin exists at the second point because we don't have disk access at that point. So instead, the first time we're asked about plugins (before we're sandboxed), record whether the plugin is actually available and use that to skip loading it in the second pass. BUG=51546 Review URL: http://codereview.chromium.org/3114005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55609 0039d316-1c4b-4281-b951-d872f2087c98
* Remove GetSwitchValue() from chrome/* where easy.evan@chromium.org2010-08-061-9/+17
| | | | | | Review URL: http://codereview.chromium.org/3057033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55176 0039d316-1c4b-4281-b951-d872f2087c98
* Rename --enable-chromoting to --enable-remotinghclam@chromium.org2010-08-051-1/+1
| | | | | | | | Renaming the flag so we don't expose the internal name. Review URL: http://codereview.chromium.org/3037043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55006 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for pdf plugin not loaded in the linux sandbox.gene@chromium.org2010-08-041-2/+4
| | | | | | | | | BUG=none TEST=Run linux Chrome with sandbox and verify internal PDF viewer displaying PDFs. Review URL: http://codereview.chromium.org/3081013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54986 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Remove GetSwitchValue() from chrome/* where easy."evan@chromium.org2010-08-041-14/+9
| | | | | | | | This reverts commit r54966. Meant to try it, not commit it, sorry everyone. :( git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54969 0039d316-1c4b-4281-b951-d872f2087c98
* Remove GetSwitchValue() from chrome/* where easy.evan@chromium.org2010-08-041-9/+14
| | | | | | Review URL: http://codereview.chromium.org/3057033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54966 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: bit hacky way to ensure Pepper plugins get loaded by zygote.viettrungluu@chromium.org2010-07-281-0/+22
| | | | | | | | | BUG=49702 TEST=Integrated PDF plugin should work on Linux Chrome, and --register-pepper-plugins works on Linux even with sandbox enabled. Review URL: http://codereview.chromium.org/3031011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53977 0039d316-1c4b-4281-b951-d872f2087c98
* Add the ability to specify the name and description for a pepper plugin loadedbrettw@chromium.org2010-07-161-2/+11
| | | | | | | | | | | | on the command line. This is necessary to emulate known plugin types with Pepper since web pages do sniffing on these to detect if the corresponding plugin is installed. TEST=none BUG=none Review URL: http://codereview.chromium.org/2985010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52672 0039d316-1c4b-4281-b951-d872f2087c98
* Load Pepper v2 internal pdf plugin.jam@chromium.org2010-07-161-3/+0
| | | | | | Review URL: http://codereview.chromium.org/2891016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52575 0039d316-1c4b-4281-b951-d872f2087c98
* Don't add the pdf plugin to pepper_plugin_registry yet. This avoids it ↵jam@chromium.org2010-07-131-0/+3
| | | | | | | | | showing up twice in Linux (not sure why not on Windows). BUG=48181 Review URL: http://codereview.chromium.org/2947010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52166 0039d316-1c4b-4281-b951-d872f2087c98