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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 // This is called on the main thread. | 93 // This is called on the main thread. |
94 virtual void workerContextFailedToStart() {} | 94 virtual void workerContextFailedToStart() {} |
95 | 95 |
96 // Called when the worker script is evaluated. |success| is true if the | 96 // Called when the worker script is evaluated. |success| is true if the |
97 // evaluation completed with no uncaught exception. | 97 // evaluation completed with no uncaught exception. |
98 virtual void didEvaluateWorkerScript(bool success) {} | 98 virtual void didEvaluateWorkerScript(bool success) {} |
99 | 99 |
100 // Called when the worker context is initialized. | 100 // Called when the worker context is initialized. |
101 virtual void didInitializeWorkerContext(v8::Local<v8::Context> context) {} | 101 virtual void didInitializeWorkerContext(v8::Local<v8::Context> context) {} |
102 | 102 |
| 103 // Called when some API to be recorded in UseCounter is called on the worker |
| 104 // global scope. |
| 105 virtual void countFeature(uint32_t feature) {} |
| 106 |
103 // Called when the WorkerGlobalScope had an error or an exception. | 107 // Called when the WorkerGlobalScope had an error or an exception. |
104 virtual void reportException(const WebString& errorMessage, | 108 virtual void reportException(const WebString& errorMessage, |
105 int lineNumber, | 109 int lineNumber, |
106 int columnNumber, | 110 int columnNumber, |
107 const WebString& sourceURL) {} | 111 const WebString& sourceURL) {} |
108 | 112 |
109 // Called when the console message is reported. | 113 // Called when the console message is reported. |
110 virtual void reportConsoleMessage(int source, | 114 virtual void reportConsoleMessage(int source, |
111 int level, | 115 int level, |
112 const WebString& message, | 116 const WebString& message, |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 // Called when the worker wants to register subscopes to handle via foreign | 275 // Called when the worker wants to register subscopes to handle via foreign |
272 // fetch. Will only be called while an install event is in progress. | 276 // fetch. Will only be called while an install event is in progress. |
273 virtual void registerForeignFetchScopes( | 277 virtual void registerForeignFetchScopes( |
274 const WebVector<WebURL>& subScopes, | 278 const WebVector<WebURL>& subScopes, |
275 const WebVector<WebSecurityOrigin>& origins) = 0; | 279 const WebVector<WebSecurityOrigin>& origins) = 0; |
276 }; | 280 }; |
277 | 281 |
278 } // namespace blink | 282 } // namespace blink |
279 | 283 |
280 #endif // WebServiceWorkerContextClient_h | 284 #endif // WebServiceWorkerContextClient_h |
OLD | NEW |