summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/npobject_proxy.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 02:18:30 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 02:18:30 +0000
commit8beff076f15f979f9334ad9f962444f57050fe52 (patch)
treef504f4c35856204e385fa12e2f3c8a45c6bdc6a8 /chrome/plugin/npobject_proxy.h
parente67efe3af047fdf3ca4e62ed54cadf12b5bbbea2 (diff)
downloadchromium_src-8beff076f15f979f9334ad9f962444f57050fe52.zip
chromium_src-8beff076f15f979f9334ad9f962444f57050fe52.tar.gz
chromium_src-8beff076f15f979f9334ad9f962444f57050fe52.tar.bz2
Get rid of the need for cross process events in order to get plugin processes to run nested message loops when a dialog is shown. Instead use an async message that's broadcast from the renderer to all plugin processes that are connected to it, and which is dispatched on the plugin IO thread to set a process-local waitable event. This fixes showModalDialog on Linux/Mac.
BUG=15891 TEST=covered by UI tests, undef's them for POSIX Review URL: http://codereview.chromium.org/242043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27456 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/plugin/npobject_proxy.h')
-rw-r--r--chrome/plugin/npobject_proxy.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/chrome/plugin/npobject_proxy.h b/chrome/plugin/npobject_proxy.h
index 8858a1b..08b408d 100644
--- a/chrome/plugin/npobject_proxy.h
+++ b/chrome/plugin/npobject_proxy.h
@@ -8,6 +8,7 @@
#ifndef CHROME_PLUGIN_NPOBJECT_PROXY_H_
#define CHROME_PLUGIN_NPOBJECT_PROXY_H_
+#include "base/gfx/native_widget_types.h"
#include "base/ref_counted.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_channel.h"
@@ -16,10 +17,6 @@
class PluginChannelBase;
struct NPObject;
-namespace base {
-class WaitableEvent;
-}
-
// When running a plugin in a different process from the renderer, we need to
// proxy calls to NPObjects across process boundaries. This happens both ways,
// as a plugin can get an NPObject for the window, and a page can get an
@@ -33,11 +30,10 @@ class NPObjectProxy : public IPC::Channel::Listener,
public:
~NPObjectProxy();
- // modal_dialog_event_ is must be valid for the lifetime of the NPObjectProxy.
static NPObject* Create(PluginChannelBase* channel,
int route_id,
intptr_t npobject_ptr,
- base::WaitableEvent* modal_dialog_event,
+ gfx::NativeViewId containing_window,
const GURL& page_url);
// IPC::Message::Sender implementation:
@@ -103,7 +99,7 @@ class NPObjectProxy : public IPC::Channel::Listener,
NPObjectProxy(PluginChannelBase* channel,
int route_id,
intptr_t npobject_ptr,
- base::WaitableEvent* modal_dialog_event,
+ gfx::NativeViewId containing_window,
const GURL& page_url);
// IPC::Channel::Listener implementation:
@@ -120,7 +116,7 @@ class NPObjectProxy : public IPC::Channel::Listener,
scoped_refptr<PluginChannelBase> channel_;
int route_id_;
intptr_t npobject_ptr_;
- base::WaitableEvent* modal_dialog_event_;
+ gfx::NativeViewId containing_window_;
// The url of the main frame hosting the plugin.
GURL page_url_;