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

Unified Diff: webkit/plugins/npapi/webplugin_delegate_impl_win.cc

Issue 8539023: base::Bind: Conversions in webkit/plugins/npapi. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | « webkit/plugins/npapi/webplugin_delegate_impl.h ('k') | webkit/plugins/npapi/webplugin_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/npapi/webplugin_delegate_impl_win.cc
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
index 61e39daa1e080858ff6428b54d6e41e952efe006..a4ee57aecb82373fe950c6adc25cc8dda5412120 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
@@ -8,6 +8,8 @@
#include <string>
#include <vector>
+#include "base/bind.h"
+#include "base/compiler_specific.h"
#include "base/file_util.h"
#include "base/lazy_instance.h"
#include "base/memory/scoped_ptr.h"
@@ -324,8 +326,7 @@ WebPluginDelegateImpl::WebPluginDelegateImpl(
handle_event_message_filter_hook_(NULL),
handle_event_pump_messages_event_(NULL),
user_gesture_message_posted_(false),
-#pragma warning(suppress: 4355) // can use this
- user_gesture_msg_factory_(this),
+ ALLOW_THIS_IN_INITIALIZER_LIST(user_gesture_msg_factory_(this)),
handle_event_depth_(0),
mouse_hook_(NULL),
first_set_window_call_(true),
@@ -698,8 +699,8 @@ void WebPluginDelegateImpl::OnThrottleMessage() {
}
if (!throttle_queue_was_empty) {
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- NewRunnableFunction(&WebPluginDelegateImpl::OnThrottleMessage),
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE, base::Bind(&WebPluginDelegateImpl::OnThrottleMessage),
kFlashWMUSERMessageThrottleDelayMs);
}
}
@@ -721,8 +722,8 @@ void WebPluginDelegateImpl::ThrottleMessage(WNDPROC proc, HWND hwnd,
throttle_queue->push_back(msg);
if (throttle_queue->size() == 1) {
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- NewRunnableFunction(&WebPluginDelegateImpl::OnThrottleMessage),
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE, base::Bind(&WebPluginDelegateImpl::OnThrottleMessage),
kFlashWMUSERMessageThrottleDelayMs);
}
}
@@ -1080,9 +1081,10 @@ LRESULT CALLBACK WebPluginDelegateImpl::NativeWndProc(
delegate->instance()->PushPopupsEnabledState(true);
- MessageLoop::current()->PostDelayedTask(FROM_HERE,
- delegate->user_gesture_msg_factory_.NewRunnableMethod(
- &WebPluginDelegateImpl::OnUserGestureEnd),
+ MessageLoop::current()->PostDelayedTask(
+ FROM_HERE,
+ base::Bind(&WebPluginDelegateImpl::OnUserGestureEnd,
+ delegate->user_gesture_msg_factory_.GetWeakPtr()),
kWindowedPluginPopupTimerMs);
}
« no previous file with comments | « webkit/plugins/npapi/webplugin_delegate_impl.h ('k') | webkit/plugins/npapi/webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698