diff options
author | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 00:49:23 +0000 |
---|---|---|
committer | dcheng@chromium.org <dcheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-22 00:49:23 +0000 |
commit | 92d86a2cbb32d57b7d875c198783d961bed62dd0 (patch) | |
tree | 43fdb4216080f1a4b6892077a868b4513b624832 /webkit/support | |
parent | da2c2744e7103580326855e6b9cad971d8398b54 (diff) | |
download | chromium_src-92d86a2cbb32d57b7d875c198783d961bed62dd0.zip chromium_src-92d86a2cbb32d57b7d875c198783d961bed62dd0.tar.gz chromium_src-92d86a2cbb32d57b7d875c198783d961bed62dd0.tar.bz2 |
base::Bind() conversion for webkit.
BUG=none
TEST=trybots
Review URL: http://codereview.chromium.org/8550010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/webkit_support.cc | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index e83a935..c448f59 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -6,6 +6,8 @@ #include "base/at_exit.h" #include "base/base64.h" +#include "base/bind.h" +#include "base/bind_helpers.h" #include "base/command_line.h" #include "base/debug/debugger.h" #include "base/file_path.h" @@ -207,26 +209,6 @@ class WebKitClientMessageLoopImpl MessageLoop* message_loop_; }; -// An wrapper object for giving TaskAdaptor ref-countability, -// which NewRunnableMethod() requires. -class TaskAdaptorHolder : public CancelableTask { - public: - explicit TaskAdaptorHolder(webkit_support::TaskAdaptor* adaptor) - : adaptor_(adaptor) { - } - - virtual void Run() { - adaptor_->Run(); - } - - virtual void Cancel() { - adaptor_.reset(); - } - - private: - scoped_ptr<webkit_support::TaskAdaptor> adaptor_; -}; - webkit_support::GraphicsContext3DImplementation g_graphics_context_3d_implementation = webkit_support::IN_PROCESS_COMMAND_BUFFER; @@ -428,12 +410,12 @@ WebDevToolsAgentClient::WebKitClientMessageLoop* CreateDevToolsMessageLoop() { void PostDelayedTask(void (*func)(void*), void* context, int64 delay_ms) { MessageLoop::current()->PostDelayedTask( - FROM_HERE, NewRunnableFunction(func, context), delay_ms); + FROM_HERE, base::Bind(func, context), delay_ms); } void PostDelayedTask(TaskAdaptor* task, int64 delay_ms) { MessageLoop::current()->PostDelayedTask( - FROM_HERE, new TaskAdaptorHolder(task), delay_ms); + FROM_HERE, base::Bind(&TaskAdaptor::Run, base::Owned(task)), delay_ms); } // Wrappers for FilePath and file_util |