Chromium Code Reviews| Index: public/web/WebEmbeddedWorker.h |
| diff --git a/public/web/mac/WebScrollbarTheme.h b/public/web/WebEmbeddedWorker.h |
| similarity index 61% |
| copy from public/web/mac/WebScrollbarTheme.h |
| copy to public/web/WebEmbeddedWorker.h |
| index 48a2afccd4f74361db021166c6aeb115284546cb..46f635819fa0f36f902ba16b3d2d445ae98edaba 100644 |
| --- a/public/web/mac/WebScrollbarTheme.h |
| +++ b/public/web/WebEmbeddedWorker.h |
| @@ -28,25 +28,41 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef WebScrollbarTheme_h |
| -#define WebScrollbarTheme_h |
| +#ifndef WebEmbeddedWorker_h |
| +#define WebEmbeddedWorker_h |
| +#include "WebContentSecurityPolicy.h" |
| +#include "WebEmbeddedWorkerStartMode.h" |
| #include "public/platform/WebCommon.h" |
| namespace WebKit { |
|
abarth-chromium
2013/11/07 17:51:13
WebKit -> blink
kinuko
2013/11/08 12:17:23
Done.
|
| -class WebScrollbarTheme { |
| +class WebEmbeddedWorkerClient; |
| +class WebString; |
| +class WebURL; |
| + |
| +// An interface to start and terminate an embedded worker. |
| +// All methods of this class must be called on the main thread. |
| +class WebEmbeddedWorker { |
|
abarth-chromium
2013/11/07 17:51:13
Is an EmbeddedWorker a SharedWorker or can it be a
kinuko
2013/11/08 12:17:23
It's primarily for ServiceWorker. I'm thinking abo
|
| public: |
| - // Updates the scrollbar appearance and behavior. |
| - // |initialButtonDelay| is the current value of NSScrollerButtonDelay from NSUserDefaults. |
| - // |autoscrollButtonDelay| is the current value of NSScrollerButtonPeriod from NSUserDefaults. |
| - // |jumpOnTrackClick| is the current value of AppleScrollerPagingBehavior from NSUserDefaults. |
| - // |redraw| is true if the update requires a redraw to include the change. |
| - BLINK_EXPORT static void updateScrollbars( |
| - float initialButtonDelay, float autoscrollButtonDelay, |
| - bool jumpOnTrackClick, bool redraw); |
| + // Invoked on the main thread to instantiate a WebEmbeddedWorker. |
| + // The given WebEmbeddedWorkerClient is going to be passed on to the |
| + // worker thread and is held by a newly created WorkerGlobalScope. |
| + BLINK_EXPORT static WebEmbeddedWorker* create(WebEmbeddedWorkerClient*); |
| + |
| + virtual ~WebEmbeddedWorker() { } |
| + |
| + virtual void startWorkerGlobalScope( |
| + const WebURL& scriptURL, |
| + const WebString& scriptSource, |
| + const WebString& userAgent, |
| + const WebString& contentSecurityPolicy, |
| + WebContentSecurityPolicyType, |
| + WebEmbeddedWorkerStartMode) { } |
|
abarth-chromium
2013/11/07 17:51:13
Should these be pure virtual?
Rather than adding
kinuko
2013/11/08 12:17:23
Done.
|
| + |
| + virtual void terminateWorkerGlobalScope() { } |
| }; |
| } // namespace WebKit |
| -#endif |
| +#endif // WebEmbeddedWorker_h |