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

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: updated 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/WebEmbeddedWorkerStartData.h » ('j') | public/web/WebEmbeddedWorkerStartData.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 64%
copy from public/web/mac/WebScrollbarTheme.h
copy to public/web/WebEmbeddedWorker.h
index 66cff89944e0d58c85f0ac5d4a5e0eb0fc1c1a6e..707ab09968699cb1f4884f715cfc68e9e9a657c4 100644
--- a/public/web/mac/WebScrollbarTheme.h
+++ b/public/web/WebEmbeddedWorker.h
@@ -28,25 +28,35 @@
* 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 "public/platform/WebCommon.h"
namespace blink {
-class WebScrollbarTheme {
+class WebServiceWorkerContextClient;
+struct WebEmbeddedWorkerStartData;
+
+// An interface to start and terminate an embedded worker.
+// All methods of this class must be called on the main thread.
+class WebEmbeddedWorker {
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 WebWorkerContextClient and WebWorkerPermissionClientProxy are
+ // going to be passed on to the worker thread and is held by a newly
+ // created WorkerGlobalScope.
+ BLINK_EXPORT static WebEmbeddedWorker* create(
+ WebServiceWorkerContextClient*,
+ WebWorkerPermissionClientProxy*);
+
+ virtual ~WebEmbeddedWorker() { }
+
+ // Starts and terminates WorkerThread and WorkerGlobalScope.
+ virtual void startWorkerContext(const WebEmbeddedWorkerStartData&) = 0;
+ virtual void terminateWorkerContext() = 0;
};
} // namespace blink
-#endif
+#endif // WebEmbeddedWorker_h
« no previous file with comments | « no previous file | public/web/WebEmbeddedWorkerStartData.h » ('j') | public/web/WebEmbeddedWorkerStartData.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698