Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3263)

Unified Diff: chrome/plugin/webplugin_proxy.cc

Issue 16554: WaitableEvent (Closed)
Patch Set: Addresssing darin's comments (round 2) Created 11 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/plugin/webplugin_proxy.cc
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
index 0bd6ed82b5df293db4a2fc1b1515646630bdcf0d..bb7ee5c6afe5cf7b15fadbdcc53402bfcd9324ab 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -8,6 +8,7 @@
#include "base/scoped_handle.h"
#include "base/shared_memory.h"
#include "base/singleton.h"
+#include "base/waitable_event.h"
#include "chrome/common/gfx/chrome_canvas.h"
#include "chrome/common/plugin_messages.h"
#include "chrome/common/win_util.h"
@@ -47,7 +48,7 @@ WebPluginProxy::WebPluginProxy(
FALSE,
0);
DCHECK(result) << "Couldn't duplicate the modal dialog handle for the plugin.";
- modal_dialog_event_.Set(event);
+ modal_dialog_event_.reset(new base::WaitableEvent(event));
}
WebPluginProxy::~WebPluginProxy() {
@@ -121,7 +122,7 @@ NPObject* WebPluginProxy::GetWindowScriptNPObject() {
window_npobject_ = NPObjectProxy::Create(channel_,
npobject_route_id,
npobject_ptr,
- modal_dialog_event_.Get());
+ modal_dialog_event_.get());
return window_npobject_;
}
@@ -141,7 +142,7 @@ NPObject* WebPluginProxy::GetPluginElement() {
plugin_element_ = NPObjectProxy::Create(channel_,
npobject_route_id,
npobject_ptr,
- modal_dialog_event_.Get());
+ modal_dialog_event_.get());
return plugin_element_;
}
@@ -170,8 +171,9 @@ void WebPluginProxy::ShowModalHTMLDialog(const GURL& url, int width, int height,
// Create a new event and set it. This forces us to pump messages while
// waiting for a response (which won't come until the dialog is closed). This
// avoids a deadlock.
- ScopedHandle event(CreateEvent(NULL, FALSE, TRUE, NULL));
- msg->set_pump_messages_event(event);
+ scoped_ptr<base::WaitableEvent> event(
+ new base::WaitableEvent(false, true));
+ msg->set_pump_messages_event(event.get());
Send(msg);
}
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | chrome/renderer/render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698