| 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 // ServiceWorker has prepared everything for script loading and is now ready
for inspection. |
| 75 virtual void workerReadyForInspection() { } |
| 76 |
| 74 // A new WorkerGlobalScope is created and started to run on the | 77 // A new WorkerGlobalScope is created and started to run on the |
| 75 // worker thread. | 78 // worker thread. |
| 76 // This also gives back a proxy to the client to talk to the | 79 // This also gives back a proxy to the client to talk to the |
| 77 // newly created WorkerGlobalScope. The proxy is held by WorkerGlobalScope | 80 // newly created WorkerGlobalScope. The proxy is held by WorkerGlobalScope |
| 78 // and should not be held by the caller. No proxy methods should be called | 81 // and should not be held by the caller. No proxy methods should be called |
| 79 // after willDestroyWorkerContext() is called. | 82 // after willDestroyWorkerContext() is called. |
| 80 virtual void workerContextStarted(WebServiceWorkerContextProxy*) { } | 83 virtual void workerContextStarted(WebServiceWorkerContextProxy*) { } |
| 81 | 84 |
| 82 // WorkerGlobalScope is about to be destroyed. The client should clear | 85 // WorkerGlobalScope is about to be destroyed. The client should clear |
| 83 // the WebServiceWorkerGlobalScopeProxy when this is called. | 86 // 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(); } | 133 virtual void getClients(WebServiceWorkerClientsCallbacks*) { BLINK_ASSERT_NO
T_REACHED(); } |
| 131 | 134 |
| 132 // Callee receives ownership of the passed vector. | 135 // Callee receives ownership of the passed vector. |
| 133 // FIXME: Blob refs should be passed to maintain ref counts. crbug.com/35175
3 | 136 // 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(); } | 137 virtual void postMessageToClient(int clientID, const WebString&, WebMessageP
ortChannelArray*) { BLINK_ASSERT_NOT_REACHED(); } |
| 135 }; | 138 }; |
| 136 | 139 |
| 137 } // namespace blink | 140 } // namespace blink |
| 138 | 141 |
| 139 #endif // WebServiceWorkerContextClient_h | 142 #endif // WebServiceWorkerContextClient_h |
| OLD | NEW |