summaryrefslogtreecommitdiffstats
path: root/chrome/browser/plugin_process_host.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace the RenderProcessHost.PID function that returns the OS-generatedbrettw@chromium.org2009-08-311-1/+1
| | | | | | | | | | | | | | | | | | | | process ID with an internally-generated id() function. This allows us the guarantee that the IDs are unique over the entire run of the application. This also cleans up some code associated with managing the PID. The main potentially interesting change is now the PID is set uniquely for every creation of RenderProcessHost. It used to be set cleared if the process went away, and re-set if the process was re-created. The ID generation is in ChildProcesInfo so it is also unique between workers and plugins. I had to change some significant things in resource_dispatcher_host_unittest to take into account this new generation of IDs. BUG=17828 TEST=none Review URL: http://codereview.chromium.org/160203 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24899 0039d316-1c4b-4281-b951-d872f2087c98
* CPAPI (0.11) for gears drag drop.mpcomplete@chromium.org2009-07-231-1/+3
| | | | | | | | | | | | Provide a method that allows the gears plugin to ask the browser process to verify that its renderer has permission to access the drop files. Update the copyright notices. BUG=7995 Review URL: http://codereview.chromium.org/159074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21437 0039d316-1c4b-4281-b951-d872f2087c98
* Split the IPC code into ipc/agl@chromium.org2009-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This splits the ipc code from the common project. The 'common' project pulls in all of webkit, the v8 bindings, skia, googleurl, and a number of other projects which makes it very difficult to deal with especially for external projects wanting just to use some of Chromium's infrastructure. This puts the ipc code into its top-level ipc/ directory with a dependency only on base. The common project depends on the new ipc/ipc.gyp:ipc target so that all projects currently pulling common in to get the IPC code still have it available. This mostly follows agl's pre-gyp attempt to do this which was r13062. Known issues: - Currently a number of projects depend on chrome/chrome.gyp:common in order to use the IPC infrastructure. Rather than fixing all of these dependencies I have made common depend on ipc/ipc.gyp:ipc and added "ipc" to the include_rules section of DEPS so that checkdeps.py doesn't complain. Over time projects that need IPC should depend on the IPC project themselves and dependencies on common removed, although I don't think many projects that need IPC will be able to get away without common currently. - ipc/ipc_message_macros.h still has #include "chrome/common/..." inside of a ipc/ should not refer to files in chrome/... now. I'm not sure how to resolve this since it's really an IDE bug - the named pipe name (windows+linux) and the logging event name (all) + env variable (posix) refer explicitly to 'Chrome' which somewhat hurts the illusion of ipc/ being an independent library. I think this should be examined in a subsequent, much smaller patch. - I've eliminated the IPC.SendMsgCount counter since it was implemented in a way to create a dependency from ipc/ to chrome/common/chrome_counters. This is the same approach that r13062 took. http://codereview.chromium.org/155905 (Patch from James Robinson) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21342 0039d316-1c4b-4281-b951-d872f2087c98
* linux: OOP windowed pluginsevan@chromium.org2009-07-071-0/+4
| | | | | | | | | | | | | | There are still a few issues, but that's a start. - only windowed plugins - we can't currently create the gtksocket in background tabs, because their gtkwidgets are not yet in the hierarchy, so they can't be realized (that's what gives the XID). - the plugin process talks to the browser process through the renderer process to create/destroy the gtksockets, because the plugin doesn't know which renderer it's talking to. We need a bit more plumbing to be able to have direct IPC. - some code is duplicated between chrome and test_shell. We should probably refactor it, but I'm not sure where the common part should live. Patch from Antoine Labour <piman@google.com>, with some touchups by me. Review URL: http://codereview.chromium.org/146078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20041 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "linux: OOP windowed plugins"evan@chromium.org2009-07-061-4/+0
| | | | | | This reverts r19983. Test failures on Mac and Windows. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19988 0039d316-1c4b-4281-b951-d872f2087c98
* linux: OOP windowed pluginsevan@chromium.org2009-07-061-0/+4
| | | | | | | | | | | | There are still a few issues, but that's a start. - only windowed plugins - we can't currently create the gtksocket in background tabs, because their gtkwidgets are not yet in the hierarchy, so they can't be realized (that's what gives the XID). - the plugin process talks to the browser process through the renderer process to create/destroy the gtksockets, because the plugin doesn't know which renderer it's talking to. We need a bit more plumbing to be able to have direct IPC. - some code is duplicated between chrome and test_shell. We should probably factor it, but I'm not sure where the common part should live. Review URL: http://codereview.chromium.org/146078 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19983 0039d316-1c4b-4281-b951-d872f2087c98
* mac/linux: rework plugin channel file descriptor creationevan@chromium.org2009-06-271-6/+3
| | | | | | | | | | | | This CL fixes a bug where the same renderer could open several channels to the same plugin process, which end up having the same name. This CL makes it that there is only one channel for each (plugin, renderer) pair, just like on Windows. The socketpair is created in the plugin process (which can ensure that only one channel per renderer gets created), and sends the renderer side through the browser process. Note: this should essentially be a noop on Windows. Review URL: http://codereview.chromium.org/149062 Patch from Antoine Labour <piman@google.com>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19448 0039d316-1c4b-4281-b951-d872f2087c98
* posix: two related changes to make plugin IPC work on POSIX.evan@chromium.org2009-06-221-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | [re-retry, seeing if reliability bots like it] * use a new ChannelHandle type when passing IPC channels over IPC The current POSIX code assumes that one end of a channel is always a new child process (a renderer). For plugins we need to be able to construct channels between each of the browser, plugin, and renderer. This change augments the messages related to creating channels to allow passing in a base::FileDescriptor containing the socket. The intent is that the browser process, as the initial interchange between plugin and renderer, creates the socketpair() on their behalf and hands each their respective end of the connection. * register channel endpoint names in the global pipe map The plugin code assumes it can map from a string to a channel endpoint at basically any time. So whenever we get a channel endpoint over IPC, we install it in a global map of channel endpoints. Review URL: http://codereview.chromium.org/113157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18950 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "posix: two related changes to make plugin IPC work on POSIX."evan@chromium.org2009-06-221-7/+3
| | | | | | | | This looks like it might be to blame for reliability test failures, so I'm trying it out. This reverts commit r18888. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18905 0039d316-1c4b-4281-b951-d872f2087c98
* posix: two related changes to make plugin IPC work on POSIX.evan@chromium.org2009-06-201-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | [retry, fix windows compile failure] * use a new ChannelHandle type when passing IPC channels over IPC The current POSIX code assumes that one end of a channel is always a new child process (a renderer). For plugins we need to be able to construct channels between each of the browser, plugin, and renderer. This change augments the messages related to creating channels to allow passing in a base::FileDescriptor containing the socket. The intent is that the browser process, as the initial interchange between plugin and renderer, creates the socketpair() on their behalf and hands each their respective end of the connection. * register channel endpoint names in the global pipe map The plugin code assumes it can map from a string to a channel endpoint at basically any time. So whenever we get a channel endpoint over IPC, we install it in a global map of channel endpoints. Review URL: http://codereview.chromium.org/113157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18888 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "posix: two related changes to make plugin IPC work on POSIX."evan@chromium.org2009-06-191-7/+3
| | | | | | This reverts commit r18850, as it had a compile failure. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18851 0039d316-1c4b-4281-b951-d872f2087c98
* posix: two related changes to make plugin IPC work on POSIX.evan@chromium.org2009-06-191-3/+7
| | | | | | | | | | | | | | | | | | | | | | * use a new ChannelHandle type when passing IPC channels over IPC The current POSIX code assumes that one end of a channel is always a new child process (a renderer). For plugins we need to be able to construct channels between each of the browser, plugin, and renderer. This change augments the messages related to creating channels to allow passing in a base::FileDescriptor containing the socket. The intent is that the browser process, as the initial interchange between plugin and renderer, creates the socketpair() on their behalf and hands each their respective end of the connection. * register channel endpoint names in the global pipe map The plugin code assumes it can map from a string to a channel endpoint at basically any time. So whenever we get a channel endpoint over IPC, we install it in a global map of channel endpoints. Review URL: http://codereview.chromium.org/113157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18850 0039d316-1c4b-4281-b951-d872f2087c98
* ipc: use strings, not wstrings for channel ids.evan@chromium.org2009-06-041-2/+2
| | | | | | | | | | They're ASCII anyway. TEST=covered by existing tests Review URL: http://codereview.chromium.org/119131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17682 0039d316-1c4b-4281-b951-d872f2087c98
* Chrome side of using WebPluginListBuilder.darin@chromium.org2009-04-241-1/+1
| | | | | | | | | | | | | | I also broke glue/webplugininfo.h out of glue/webplugin.h as part of this change. Eventually, glue/webplugin.h will go away and be moved into the WebKit API, but the structures left in glue/webplugininfo.h need to remain since they are used extensively throughout Chrome. BUG=10922 R=dglazkov Review URL: http://codereview.chromium.org/93116 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14438 0039d316-1c4b-4281-b951-d872f2087c98
* Fix hang seen in plugin process because plugin creation ended up having to ↵jam@chromium.org2009-04-211-2/+1
| | | | | | | | | | wait on UI thread. Instead of using sync messages, the plugin hwnd is initially parented to the RenderWidgetHost's HWND. It's then lazily reparented to an intermediate HWND on the UI thread when it comes time to move it. BUG=10711 TEST=added regression tests, but testers please confirm plugins on top video sites are placed correctly. Review URL: http://codereview.chromium.org/67285 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14137 0039d316-1c4b-4281-b951-d872f2087c98
* Port plugin messages.jam@chromium.org2009-04-011-2/+2
| | | | | | Review URL: http://codereview.chromium.org/49050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12928 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor plugin process code which checks with the browser process before ↵jam@chromium.org2009-03-271-4/+2
| | | | | | | | | | | shutdown, to avoid races in which the browser process thinks the process is fine to use while it's shutting down. I also removed PluginProcess/WorkerProcess since they didn't have any code in them now. I removed the plugin process code which waits 10 seconds before shutting itself down. That was a premature optimization, since testing with/without this didn't show any difference (see http://www/~jabdelmalek/chrome/test/plugins/processes.html). In both cases, the plugin on a page would get recreated in less than 100ms, even with reusing or starting a plugin process from scratch. We already spawn new renderer processes on back and forth if it's a different origin, and the plugin will be in the cache anyways. Review URL: http://codereview.chromium.org/53091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12703 0039d316-1c4b-4281-b951-d872f2087c98
* Hide the details about ResourceDispatcherHost messages from child processes. ↵jam@chromium.org2009-03-171-11/+6
| | | | | | | | The usage of RDH is now like RD, the client sends the message to RDH to see if it should handle it. I added methods to the Receiver interface so that RDH can get to the process id/handle/type when starting requests. Review URL: http://codereview.chromium.org/42202 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11816 0039d316-1c4b-4281-b951-d872f2087c98
* Stop having renderers use both pids and a monotonically increasing ↵jam@chromium.org2009-03-121-2/+3
| | | | | | | | "host_id". This allows ResourceDispatcher to be used by child processes other than renderers. I've done minor related cleanup on the way to make the code simpler. Review URL: http://codereview.chromium.org/42054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11509 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGEdeanm@chromium.org2009-03-101-1/+0
| | | | | | | | | Normalize end of file newlines in chrome/. All files end in a single newline. Review URL: http://codereview.chromium.org/42015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11331 0039d316-1c4b-4281-b951-d872f2087c98
* Ensure that we display a sad face for a windowed plugin when the plugin ↵ananta@chromium.org2009-03-051-0/+11
| | | | | | | | | | | | | | | process crashes. This was a regression introduced by creating the plugin parent on the browser UI thread, which remains valid when the plugin process crashes. The fix is to track plugin wrapper windows in the PluginProcessHost class and destroy any remaining windows in the destructor. Removed the DestroyWindowTask which destroys the windows on the UI thread. We can achieve the same result by posting WM_CLOSE messages to these windows. This fixes http://code.google.com/p/chromium/issues/detail?id=7673 Bug=7673 Review URL: http://codereview.chromium.org/40120 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10960 0039d316-1c4b-4281-b951-d872f2087c98
* Make plugin_process_host.cc and child_process_host.cc compile on Posix.jhawkins@chromium.org2009-02-231-4/+10
| | | | | | Review URL: http://codereview.chromium.org/27018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10210 0039d316-1c4b-4281-b951-d872f2087c98
* Take out common functionality from PluginProcessHost and move it to ↵jam@chromium.org2009-02-181-28/+3
| | | | | | | | ChildProcessHost. Review URL: http://codereview.chromium.org/21443 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9935 0039d316-1c4b-4281-b951-d872f2087c98
* Have ChildProcessInfo contain a list of all running child processes (i.e. ↵jam@chromium.org2009-02-131-9/+4
| | | | | | | | instead of Service and other child process service maintain it). In a future change I'll start moving some of the code from PluginProcessHost to ChildProcessInfo. Review URL: http://codereview.chromium.org/24017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9804 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor plugin process code in the browser process so that the ↵jam@chromium.org2009-02-111-13/+7
| | | | | | | | browser/about:memory/task manager/metrics code doesn't depend on PluginProcessHost pointers. In a future changelist I'll add one central child process registry in the browser process. Review URL: http://codereview.chromium.org/20196 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9621 0039d316-1c4b-4281-b951-d872f2087c98
* Move resource_message_filter and resource_request_details to the renderer_host.brettw@chromium.org2009-02-051-3/+2
| | | | | | | | | | Make the repost form warning portable by abstracting the show function from the view. Rename the Windows repost form warning and move it to browser/views. This also fixes a comment in browser_process.h Review URL: http://codereview.chromium.org/20066 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9242 0039d316-1c4b-4281-b951-d872f2087c98
* Move proxy resolve requests out of plugin/renderer process, and into the ↵ericroman@google.com2009-01-311-5/+11
| | | | | | | | browser. Review URL: http://codereview.chromium.org/14142 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9006 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a timing issue that caused gears to fail to load sometimes.mpcomplete@google.com2009-01-211-1/+0
| | | | | | | | BUG=http://b/issue?id=1559007 BUG=http://code.google.com/p/chromium/issues/detail?id=4219 Review URL: http://codereview.chromium.org/18604 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8417 0039d316-1c4b-4281-b951-d872f2087c98
* Improve scrolling performance when there are many windowed plugins in a page.jam@chromium.org2009-01-161-1/+2
| | | | | | | | This works by parenting windowed plugins with an HWND that's hosted in the browser process, so that no synchronous cross process messages are used when scrolling. BUG=5428 Review URL: http://codereview.chromium.org/18082 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8239 0039d316-1c4b-4281-b951-d872f2087c98
* Change "dll" to "plugin" where appropriate.avi@google.com2009-01-061-4/+4
| | | | | | Review URL: http://codereview.chromium.org/16543 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7617 0039d316-1c4b-4281-b951-d872f2087c98
* Move plugins to FilePaths, some cleanupavi@google.com2009-01-061-5/+5
| | | | | | Review URL: http://codereview.chromium.org/16456 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7588 0039d316-1c4b-4281-b951-d872f2087c98
* Misc proxy service changes.ericroman@google.com2008-12-101-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (1) Changed the proxy service ownership model -- rather than being a detail of the HTTP stack, it is now a dependency owned by UrlRequestContext. - ProxyService is owned by UrlRequestContext (before was HttpNetworkSession) - ProxyResolver is owned by ProxyService (before was HttpNetworkSession) Being able to share the proxy service is needed in several places, including incognito mode http context (http://crbug.com/3564), and for proxy resolving in the new FTP stack. (2) Added an IPC for getting of the ProxyResolverWinHttp dependency in the plugin process. Not hooked up yet, but intent is to route the proxy resolve requests through the browser process. (3) Changed some unit tests which were depending on the system proxy settings (this was a sideffect of their calling HttpNetworkLayer::CreateFactory(NULL)). (4) Moved the first-time ProxyService::UpdateConfig out of the constructor and into the initial request. Done to avoid startup perf regressions, since the ProxyService construction is now done earlier (on the startup critical path). BUG=3564 Review URL: http://codereview.chromium.org/12938 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6693 0039d316-1c4b-4281-b951-d872f2087c98
* Add Terminate() to the Process object, have RenderProcessHost use this to ↵brettw@google.com2008-11-141-1/+1
| | | | | | | | | | avoid some more Windows specific code. Move Process and SharedMemory into the base namespace (most changes). Review URL: http://codereview.chromium.org/10895 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5446 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Third times a charm! This is an attempt at re-landing r408. This time the ↵darin@google.com2008-08-081-6/+9
| | | | | | | | UI test is revised to give the browser a chance to notice a crashed tab. TBR=nsylvain git-svn-id: svn://svn.chromium.org/chrome/trunk/src@557 0039d316-1c4b-4281-b951-d872f2087c98
* rollback r498 and r500 to repair test bustagedarin@google.com2008-08-071-9/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@503 0039d316-1c4b-4281-b951-d872f2087c98
* Revised r408 such that we no longer sometimes fail ↵darin@google.com2008-08-071-6/+9
| | | | | | | | | | | | MetricsServiceTest.CrashRenderers. That test showed that we were exiting the browser process without noticing that a child process had crashed. I fixed that by simply adding a check to see if the child process is still around before initiating the normal close of the child process. This corresponds to the case where the browser decides to close a renderer. As a result, the race for the MessageLoop to receive a Task notifying the RenderProcessHost of a crashed renderer is removed from the picture. The bulk of this CL is just re-landing r408, which jar reviewed. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@498 0039d316-1c4b-4281-b951-d872f2087c98
* Revert change 408 to see if it fixes the ui tests.nsylvain@google.com2008-08-061-9/+6
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@438 0039d316-1c4b-4281-b951-d872f2087c98
* Convert more consumers of ML::WatchObject to ObjectWatcher.darin@google.com2008-08-051-6/+9
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@408 0039d316-1c4b-4281-b951-d872f2087c98
* Add chrome to the repository.initial.commit2008-07-261-0/+182
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15 0039d316-1c4b-4281-b951-d872f2087c98