Bug 45016

Summary: [Chromium] Add WebKitClient::callOnMainThreadWithDelay()
Product: WebKit Reporter: Kent Tamura <tkent>
Component: WebKit APIAssignee: Kent Tamura <tkent>
Status: RESOLVED INVALID    
Severity: Normal CC: dglazkov, fishd
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: All   
Bug Depends on:    
Bug Blocks: 36641    
Attachments:
Description Flags
Patch none

Description Kent Tamura 2010-08-31 21:15:23 PDT
[Chromium] Add WebKitClient::callOnMainThreadWithDelay()
Comment 1 Kent Tamura 2010-08-31 21:16:59 PDT
Created attachment 66164 [details]
Patch
Comment 2 Dimitri Glazkov (Google) 2010-08-31 21:18:16 PDT
Comment on attachment 66164 [details]
Patch

ok. I am assuming you're adding callers of this after rolling chromium?
Comment 3 Kent Tamura 2010-08-31 21:24:26 PDT
(In reply to comment #2)
> (From update of attachment 66164 [details])
> ok. I am assuming you're adding callers of this after rolling chromium?

Right.
1. commit this.
2. commit an implementation of callOnMainThreadWithDelay() in Chromium
3. roll Chromium revision and use callOnMainThreadWithDelay() in DRT
Comment 4 Kent Tamura 2010-08-31 22:46:32 PDT
Comment on attachment 66164 [details]
Patch

Clearing flags on attachment: 66164

Committed r66576: <http://trac.webkit.org/changeset/66576>
Comment 5 Kent Tamura 2010-08-31 22:46:41 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Darin Fisher (:fishd, Google) 2010-09-01 09:28:05 PDT
Comment on attachment 66164 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=66164&action=prettypatch

> WebKit/chromium/public/WebKitClient.h:263
> +    virtual void callOnMainThreadWithDelay(void (*func)(void*), void* context, long long delayMilliseconds) { }
delayMilliseconds does not need to be 'long long'.  a simple int would do here.

i'm curious... what are the consumers that require this?
Comment 7 Kent Tamura 2010-09-01 14:57:42 PDT
(In reply to comment #6)
> (From update of attachment 66164 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=66164&action=prettypatch
> 
> > WebKit/chromium/public/WebKitClient.h:263
> > +    virtual void callOnMainThreadWithDelay(void (*func)(void*), void* context, long long delayMilliseconds) { }
> delayMilliseconds does not need to be 'long long'.  a simple int would do here.
> 
> i'm curious... what are the consumers that require this?

I used "long long" because MessageLoop::postDelayedTask() uses int64 though int is enough for my purpose.

http://trac.webkit.org/browser/trunk/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp#L324 will be replaced with code using callOnMainThreadWithDelay().
Comment 8 Kent Tamura 2010-09-01 16:24:32 PDT
I have change my mind :-)
The function can be implemented in webkit_support and we don't need to pollute WebKit API.
I'll revert r66576.
Comment 9 Kent Tamura 2010-09-01 17:25:53 PDT
Reverted r66576 for reason:

This change is not needed.

Committed r66627: <http://trac.webkit.org/changeset/66627>