Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(191)

Unified Diff: public/web/WebEmbeddedWorker.h

Issue 61763004: Add EmbeddedWorker interfaces in Blink API (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | public/web/WebEmbeddedWorkerClient.h » ('j') | public/web/WebEmbeddedWorkerClient.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | public/web/WebEmbeddedWorkerClient.h » ('j') | public/web/WebEmbeddedWorkerClient.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698