Changeset 80340 in webkit


Ignore:
Timestamp:
Mar 4, 2011 2:06:30 AM (13 years ago)
Author:
morrita@google.com
Message:

2011-03-02 MORITA Hajime <morrita@google.com>

Reviewed by Kent Tamura.

[Chromium][DRT] WebTask should use webkit_support::TaskAdaptor
https://bugs.webkit.org/show_bug.cgi?id=55434

Changed WebTask to be a subclass of webkit_support::TaskAdaptor
and passed the object webkit_support::PostDelayedTask directly.

Note that the change keeps postTask() as is because it has a
semantics taht webkit_support::PostDelayedTask() has; It jumps to
the main thread.

  • DumpRenderTree/chromium/Task.cpp: (postDelayedTask):
  • DumpRenderTree/chromium/Task.h: (WebTask::Run):
Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r80319 r80340  
     12011-03-02  MORITA Hajime  <morrita@google.com>
     2
     3        Reviewed by Kent Tamura.
     4
     5        [Chromium][DRT] WebTask should use webkit_support::TaskAdaptor
     6        https://bugs.webkit.org/show_bug.cgi?id=55434
     7
     8        Changed WebTask to be a subclass of webkit_support::TaskAdaptor
     9        and passed the object webkit_support::PostDelayedTask directly.
     10
     11        Note that the change keeps postTask() as is because it has a
     12        semantics taht webkit_support::PostDelayedTask() has; It jumps to
     13        the main thread.
     14
     15        * DumpRenderTree/chromium/Task.cpp:
     16        (postDelayedTask):
     17        * DumpRenderTree/chromium/Task.h:
     18        (WebTask::Run):
     19
    1202011-03-03  Mahesh Kulkarni  <mahesh.kulkarni@nokia.com>
    221
  • trunk/Tools/DumpRenderTree/chromium/Task.cpp

    r73373 r80340  
    3434#include "WebKit.h"
    3535#include "WebKitClient.h"
    36 #include "webkit/support/webkit_support.h"
    3736
    3837WebTask::WebTask(TaskList* list): m_taskList(list) { m_taskList->registerTask(this); }
     
    7069void postDelayedTask(WebTask* task, int64_t ms)
    7170{
    72     webkit_support::PostDelayedTask(invokeTask, static_cast<void*>(task), ms);
     71    webkit_support::PostDelayedTask(task, ms);
    7372}
    7473
  • trunk/Tools/DumpRenderTree/chromium/Task.h

    r73373 r80340  
    3232#define Task_h
    3333
     34#include "webkit/support/webkit_support.h"
     35#include <wtf/OwnPtr.h>
    3436#include <wtf/Vector.h>
    3537
     
    3840// WebTask represents a task which can run by postTask() or postDelayedTask().
    3941// it is named "WebTask", not "Task", to avoid conflist with base/task.h.
    40 class WebTask {
     42class WebTask : public webkit_support::TaskAdaptor {
    4143public:
    4244    WebTask(TaskList*);
     
    4648    virtual void cancel() = 0;
    4749    virtual ~WebTask();
     50
     51private:
     52    virtual void Run() { run(); }
     53
    4854protected:
    4955    TaskList* m_taskList;
Note: See TracChangeset for help on using the changeset viewer.