Chromium Code Reviews| Index: public/web/WebEmbeddedWorkerClient.h |
| diff --git a/public/web/WebInbandTextTrack.h b/public/web/WebEmbeddedWorkerClient.h |
| similarity index 54% |
| copy from public/web/WebInbandTextTrack.h |
| copy to public/web/WebEmbeddedWorkerClient.h |
| index 07979c7919b2fa1ce4d9925cc2b16b123194e015..57897b82192cc8d7ff7acb427054bd2be7222dfd 100644 |
| --- a/public/web/WebInbandTextTrack.h |
| +++ b/public/web/WebEmbeddedWorkerClient.h |
| @@ -28,47 +28,41 @@ |
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| */ |
| -#ifndef WebInbandTextTrack_h |
| -#define WebInbandTextTrack_h |
| +#ifndef WebEmbeddedWorkerClient_h |
| +#define WebEmbeddedWorkerClient_h |
| + |
| +#include "WebWorkerPermissionClientProxy.h" |
| namespace WebKit { |
|
abarth-chromium
2013/11/07 17:51:13
WebKit -> blink
kinuko
2013/11/08 12:17:23
Done.
|
| class WebString; |
| -class WebInbandTextTrackClient; |
| +class WebServiceWorkerGlobalScopeProxy; |
| -class WebInbandTextTrack { |
| +// This interface is implemented by the client. It is suppoed to be created |
| +// on the main thread and then passed on to the worker thread to be owned |
| +// by a newly created WorkerGlobalScope. All methods of this class are |
| +// called on the worker thread. |
| +class WebEmbeddedWorkerClient : public WebWorkerPermissionClientProxy { |
|
alecflett
2013/11/08 23:18:35
This may be a non-issue, but it seems odd for an "
|
| public: |
| - enum Kind { |
| - KindSubtitles, |
| - KindCaptions, |
| - KindDescriptions, |
| - KindChapters, |
| - KindMetadata, |
| - KindNone |
| - }; |
| - |
| - enum Mode { |
| - ModeDisabled, |
| - ModeHidden, |
| - ModeShowing |
| - }; |
| - |
| - virtual ~WebInbandTextTrack() {} |
| - |
| - virtual void setClient(WebInbandTextTrackClient*) = 0; |
| - virtual WebInbandTextTrackClient* client() = 0; |
| - |
| - virtual void setMode(Mode) = 0; |
| - virtual Mode mode() const = 0; |
| + // A new WorkerGlobalScope is created and started to run on the |
| + // worker thread. |
| + // This also gives back a proxy to the client to talk to the |
| + // newly created WorkerGlobalScope. The proxy is held by WorkerGlobalScope |
| + // and should not be held by the caller. No proxy methods should be called |
| + // after workerGlobalScopeDestroyed() is called. |
| + virtual void workerGlobalScopeStarted(WebServiceWorkerGlobalScopeProxy*) { } |
| - virtual Kind kind() const = 0; |
| + // WorkerGlobalScope.close() is called. |
| + virtual void workerGlobalScopeClosed() { } |
| - virtual WebString label() const = 0; |
| - virtual WebString language() const = 0; |
| + // WorkerGlobalScope is destroyed. The client should clear the |
| + // WebServiceWorkerGlobalScopeProxy when this is called. |
| + virtual void workerGlobalScopeDestroyed() { } |
| - virtual int textTrackIndex() const = 0; |
| + virtual void dispatchDevToolsMessage(const WebString&) { } |
| + virtual void saveDevToolsAgentState(const WebString&) { } |
| }; |
| } // namespace WebKit |
| -#endif |
| +#endif // WebEmbeddedWorkerClient_h |