diff options
author | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 06:41:13 +0000 |
---|---|---|
committer | morrita@chromium.org <morrita@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-01 06:41:13 +0000 |
commit | 07f63c6bba7e33160fc54af7f2cf4cf207e0831b (patch) | |
tree | cea4aac3782d324a787a7f08fbc3113e841189dc /webkit/support/webkit_support.h | |
parent | 1f06a56edde410253186f4b6b5cdfe516f0bb4ff (diff) | |
download | chromium_src-07f63c6bba7e33160fc54af7f2cf4cf207e0831b.zip chromium_src-07f63c6bba7e33160fc54af7f2cf4cf207e0831b.tar.gz chromium_src-07f63c6bba7e33160fc54af7f2cf4cf207e0831b.tar.bz2 |
Add webkit_support::TaskAdaptor to make tasks have the desttructor.
BUG=73675
TEST=none
Review URL: http://codereview.chromium.org/6602006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76362 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/webkit_support.h')
-rw-r--r-- | webkit/support/webkit_support.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/support/webkit_support.h b/webkit/support/webkit_support.h index d145955..a3711da 100644 --- a/webkit/support/webkit_support.h +++ b/webkit/support/webkit_support.h @@ -102,6 +102,17 @@ void ServeAsynchronousMockedRequests(); bool BeingDebugged(); // -------- Message loop and task + +// A wrapper for Chromium's Task class. +// The lifecycle is managed by webkit_support thus +// You shouldn't delete the object. +// Note that canceled object is just removed. +class TaskAdaptor { + public: + virtual ~TaskAdaptor() {} + virtual void Run() = 0; +}; + void RunMessageLoop(); void QuitMessageLoop(); void RunAllPendingMessages(); @@ -112,6 +123,8 @@ WebKit::WebDevToolsAgentClient::WebKitClientMessageLoop* CreateDevToolsMessageLoop(); void PostDelayedTask(void (*func)(void*), void* context, int64 delay_ms); +void PostDelayedTask(TaskAdaptor* task, int64 delay_ms); + // -------- File path and PathService // Converts the specified path string to an absolute path in WebString. // |utf8_path| is in UTF-8 encoding, not native multibyte string. |