| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // created WorkerGlobalScope. Unless otherwise noted, all methods of this class | 56 // created WorkerGlobalScope. Unless otherwise noted, all methods of this class |
| 57 // are called on the worker thread. | 57 // are called on the worker thread. |
| 58 class WebServiceWorkerContextClient { | 58 class WebServiceWorkerContextClient { |
| 59 public: | 59 public: |
| 60 virtual ~WebServiceWorkerContextClient() {} | 60 virtual ~WebServiceWorkerContextClient() {} |
| 61 | 61 |
| 62 // ServiceWorker specific method. Called when script accesses the | 62 // ServiceWorker specific method. Called when script accesses the |
| 63 // the |scope| attribute of the ServiceWorkerGlobalScope. Immutable per spec. | 63 // the |scope| attribute of the ServiceWorkerGlobalScope. Immutable per spec. |
| 64 virtual WebURL scope() const { return WebURL(); } | 64 virtual WebURL scope() const { return WebURL(); } |
| 65 | 65 |
| 66 // ServiceWorker has prepared everything for script loading and is now ready f
or inspection. | 66 // ServiceWorker has prepared everything for script loading and is now ready |
| 67 // for inspection. |
| 67 virtual void workerReadyForInspection() {} | 68 virtual void workerReadyForInspection() {} |
| 68 | 69 |
| 69 // The worker script is successfully loaded and a new thread is about to | 70 // The worker script is successfully loaded and a new thread is about to |
| 70 // be started. Called on the main thread. | 71 // be started. Called on the main thread. |
| 71 virtual void workerScriptLoaded() {} | 72 virtual void workerScriptLoaded() {} |
| 72 | 73 |
| 73 virtual bool hasAssociatedRegistration() { return false; } | 74 virtual bool hasAssociatedRegistration() { return false; } |
| 74 | 75 |
| 75 // A new WorkerGlobalScope is created and started to run on the | 76 // A new WorkerGlobalScope is created and started to run on the |
| 76 // worker thread. | 77 // worker thread. |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 // Called when the worker wants to register subscopes to handle via foreign | 266 // Called when the worker wants to register subscopes to handle via foreign |
| 266 // fetch. Will only be called while an install event is in progress. | 267 // fetch. Will only be called while an install event is in progress. |
| 267 virtual void registerForeignFetchScopes( | 268 virtual void registerForeignFetchScopes( |
| 268 const WebVector<WebURL>& subScopes, | 269 const WebVector<WebURL>& subScopes, |
| 269 const WebVector<WebSecurityOrigin>& origins) = 0; | 270 const WebVector<WebSecurityOrigin>& origins) = 0; |
| 270 }; | 271 }; |
| 271 | 272 |
| 272 } // namespace blink | 273 } // namespace blink |
| 273 | 274 |
| 274 #endif // WebServiceWorkerContextClient_h | 275 #endif // WebServiceWorkerContextClient_h |
| OLD | NEW |