OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 loadShadowPage(); | 215 loadShadowPage(); |
216 } | 216 } |
217 | 217 |
218 WebDevToolsAgentClient::WebKitClientMessageLoop* | 218 WebDevToolsAgentClient::WebKitClientMessageLoop* |
219 WebSharedWorkerImpl::createClientMessageLoop() { | 219 WebSharedWorkerImpl::createClientMessageLoop() { |
220 return m_client->createDevToolsMessageLoop(); | 220 return m_client->createDevToolsMessageLoop(); |
221 } | 221 } |
222 | 222 |
223 // WorkerReportingProxy -------------------------------------------------------- | 223 // WorkerReportingProxy -------------------------------------------------------- |
224 | 224 |
225 void WebSharedWorkerImpl::countFeature(UseCounter::Feature) { | 225 void WebSharedWorkerImpl::countFeature(UseCounter::Feature feature) { |
226 // TODO(nhiroki): Support UseCounter for SharedWorker. Send an IPC message to | 226 m_parentFrameTaskRunners->get(TaskType::UnspecedTimer) |
227 // the browser process and ask each connected document to record API use in | 227 ->postTask(BLINK_FROM_HERE, |
228 // its UseCounter (https://crbug.com/376039). | 228 crossThreadBind(&WebSharedWorkerClient::countFeature, |
| 229 crossThreadUnretained(m_client), feature)); |
229 } | 230 } |
230 | 231 |
231 void WebSharedWorkerImpl::countDeprecation(UseCounter::Feature) { | 232 void WebSharedWorkerImpl::countDeprecation(UseCounter::Feature feature) { |
232 // TODO(nhiroki): Support UseCounter for SharedWorker. Send an IPC message to | 233 // Go through the same code path with countFeature() because a deprecation |
233 // the browser process and ask each connected document to record API use in | 234 // message is already shown on the worker console and a remaining work is just |
234 // its UseCounter (https://crbug.com/376039). | 235 // to record an API use. |
| 236 countFeature(feature); |
235 } | 237 } |
236 | 238 |
237 void WebSharedWorkerImpl::reportException(const String& errorMessage, | 239 void WebSharedWorkerImpl::reportException(const String& errorMessage, |
238 std::unique_ptr<SourceLocation>, | 240 std::unique_ptr<SourceLocation>, |
239 int exceptionId) { | 241 int exceptionId) { |
240 // Not suppported in SharedWorker. | 242 // Not suppported in SharedWorker. |
241 } | 243 } |
242 | 244 |
243 void WebSharedWorkerImpl::reportConsoleMessage(MessageSource, | 245 void WebSharedWorkerImpl::reportConsoleMessage(MessageSource, |
244 MessageLevel, | 246 MessageLevel, |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 if (devtoolsAgent) | 461 if (devtoolsAgent) |
460 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, | 462 devtoolsAgent->dispatchOnInspectorBackend(sessionId, callId, method, |
461 message); | 463 message); |
462 } | 464 } |
463 | 465 |
464 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) { | 466 WebSharedWorker* WebSharedWorker::create(WebSharedWorkerClient* client) { |
465 return new WebSharedWorkerImpl(client); | 467 return new WebSharedWorkerImpl(client); |
466 } | 468 } |
467 | 469 |
468 } // namespace blink | 470 } // namespace blink |
OLD | NEW |