summaryrefslogtreecommitdiffstats
path: root/chrome/plugin/npobject_stub.cc
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_stub.cc
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_stub.cc')
-rw-r--r--chrome/plugin/npobject_stub.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/chrome/plugin/npobject_stub.cc b/chrome/plugin/npobject_stub.cc
index a48049d..cc59bec 100644
--- a/chrome/plugin/npobject_stub.cc
+++ b/chrome/plugin/npobject_stub.cc
@@ -21,14 +21,14 @@ NPObjectStub::NPObjectStub(
NPObject* npobject,
PluginChannelBase* channel,
int route_id,
- base::WaitableEvent* modal_dialog_event,
+ gfx::NativeViewId containing_window,
const GURL& page_url)
: npobject_(npobject),
channel_(channel),
route_id_(route_id),
valid_(true),
web_plugin_delegate_proxy_(NULL),
- modal_dialog_event_(modal_dialog_event),
+ containing_window_(containing_window),
page_url_(page_url) {
channel_->AddRoute(route_id, this, true);
@@ -127,7 +127,7 @@ void NPObjectStub::OnInvoke(bool is_default,
NPVariant* args_var = new NPVariant[arg_count];
for (int i = 0; i < arg_count; ++i) {
CreateNPVariant(
- args[i], local_channel, &(args_var[i]), modal_dialog_event_,
+ args[i], local_channel, &(args_var[i]), containing_window_,
page_url_);
}
@@ -164,7 +164,7 @@ void NPObjectStub::OnInvoke(bool is_default,
delete[] args_var;
CreateNPVariantParam(
- result_var, local_channel, &result_param, true, modal_dialog_event_,
+ result_var, local_channel, &result_param, true, containing_window_,
page_url_);
NPObjectMsg_Invoke::WriteReplyParams(reply_msg, result_param, return_value);
local_channel->Send(reply_msg);
@@ -202,7 +202,7 @@ void NPObjectStub::OnGetProperty(const NPIdentifier_Param& name,
}
CreateNPVariantParam(
- result_var, channel_, property, true, modal_dialog_event_, page_url_);
+ result_var, channel_, property, true, containing_window_, page_url_);
}
void NPObjectStub::OnSetProperty(const NPIdentifier_Param& name,
@@ -214,7 +214,7 @@ void NPObjectStub::OnSetProperty(const NPIdentifier_Param& name,
NPIdentifier id = CreateNPIdentifier(name);
NPVariant property_var;
CreateNPVariant(
- property, channel_, &property_var, modal_dialog_event_, page_url_);
+ property, channel_, &property_var, containing_window_, page_url_);
if (IsPluginProcess()) {
if (npobject_->_class->setProperty) {
@@ -313,7 +313,7 @@ void NPObjectStub::OnConstruct(const std::vector<NPVariant_Param>& args,
NPVariant* args_var = new NPVariant[arg_count];
for (int i = 0; i < arg_count; ++i) {
CreateNPVariant(
- args[i], local_channel, &(args_var[i]), modal_dialog_event_, page_url_);
+ args[i], local_channel, &(args_var[i]), containing_window_, page_url_);
}
if (IsPluginProcess()) {
@@ -334,7 +334,7 @@ void NPObjectStub::OnConstruct(const std::vector<NPVariant_Param>& args,
delete[] args_var;
CreateNPVariantParam(
- result_var, local_channel, &result_param, true, modal_dialog_event_,
+ result_var, local_channel, &result_param, true, containing_window_,
page_url_);
NPObjectMsg_Invoke::WriteReplyParams(reply_msg, result_param, return_value);
local_channel->Send(reply_msg);
@@ -364,7 +364,7 @@ void NPObjectStub::OnEvaluate(const std::string& script,
NPVariant_Param result_param;
CreateNPVariantParam(
- result_var, local_channel, &result_param, true, modal_dialog_event_,
+ result_var, local_channel, &result_param, true, containing_window_,
page_url_);
NPObjectMsg_Evaluate::WriteReplyParams(reply_msg, result_param, return_value);
local_channel->Send(reply_msg);