OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
64 // ServiceWorker specific method. Called when script accesses the | 64 // ServiceWorker specific method. Called when script accesses the |
65 // the |scope| attribute of the ServiceWorkerGlobalScope. Immutable per spec . | 65 // the |scope| attribute of the ServiceWorkerGlobalScope. Immutable per spec . |
66 virtual WebURL scope() const { return WebURL(); } | 66 virtual WebURL scope() const { return WebURL(); } |
67 | 67 |
68 // If the worker was started with WebEmbeddedWorkerStartData indicating to p ause | 68 // If the worker was started with WebEmbeddedWorkerStartData indicating to p ause |
69 // after download, this method is called after the main script resource has been | 69 // after download, this method is called after the main script resource has been |
70 // downloaded. The scope will not be created and the script will not be load ed until | 70 // downloaded. The scope will not be created and the script will not be load ed until |
71 // WebEmbeddedWorker.resumeAfterDownload() is invoked. | 71 // WebEmbeddedWorker.resumeAfterDownload() is invoked. |
72 virtual void didPauseAfterDownload() { } | 72 virtual void didPauseAfterDownload() { } |
73 | 73 |
74 // A shadow page for worker was created and loaded and is now ready to | |
75 // start a worker thread. | |
pfeldman
2014/08/18 16:14:45
Let add more details on why this is needed.
| |
76 virtual void workerShadowPageLoaded() { } | |
77 | |
74 // A new WorkerGlobalScope is created and started to run on the | 78 // A new WorkerGlobalScope is created and started to run on the |
75 // worker thread. | 79 // worker thread. |
76 // This also gives back a proxy to the client to talk to the | 80 // This also gives back a proxy to the client to talk to the |
77 // newly created WorkerGlobalScope. The proxy is held by WorkerGlobalScope | 81 // newly created WorkerGlobalScope. The proxy is held by WorkerGlobalScope |
78 // and should not be held by the caller. No proxy methods should be called | 82 // and should not be held by the caller. No proxy methods should be called |
79 // after willDestroyWorkerContext() is called. | 83 // after willDestroyWorkerContext() is called. |
80 virtual void workerContextStarted(WebServiceWorkerContextProxy*) { } | 84 virtual void workerContextStarted(WebServiceWorkerContextProxy*) { } |
81 | 85 |
82 // WorkerGlobalScope is about to be destroyed. The client should clear | 86 // WorkerGlobalScope is about to be destroyed. The client should clear |
83 // the WebServiceWorkerGlobalScopeProxy when this is called. | 87 // the WebServiceWorkerGlobalScopeProxy when this is called. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
130 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO T_REACHED(); } | 134 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO T_REACHED(); } |
131 | 135 |
132 // Callee receives ownership of the passed vector. | 136 // Callee receives ownership of the passed vector. |
133 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 | 137 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175 3 |
134 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } | 138 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } |
135 }; | 139 }; |
136 | 140 |
137 } // namespace blink | 141 } // namespace blink |
138 | 142 |
139 #endif // WebServiceWorkerContextClient_h | 143 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |