| 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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 { | 251 { |
| 252 client().reportConsoleMessage(source, level, message, location->lineNumber()
, location->url()); | 252 client().reportConsoleMessage(source, level, message, location->lineNumber()
, location->url()); |
| 253 } | 253 } |
| 254 | 254 |
| 255 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes
sage) | 255 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes
sage) |
| 256 { | 256 { |
| 257 DCHECK(m_embeddedWorker); | 257 DCHECK(m_embeddedWorker); |
| 258 document().postInspectorTask(BLINK_FROM_HERE, createCrossThreadTask(&WebEmbe
ddedWorkerImpl::postMessageToPageInspector, crossThreadUnretained(m_embeddedWork
er), message)); | 258 document().postInspectorTask(BLINK_FROM_HERE, createCrossThreadTask(&WebEmbe
ddedWorkerImpl::postMessageToPageInspector, crossThreadUnretained(m_embeddedWork
er), message)); |
| 259 } | 259 } |
| 260 | 260 |
| 261 void ServiceWorkerGlobalScopeProxy::didLoadWorkerScript(size_t scriptSize, size_
t cachedMetadataSize) |
| 262 { |
| 263 DCHECK(m_workerGlobalScope); |
| 264 m_workerGlobalScope->didLoadWorkerScript(scriptSize, cachedMetadataSize); |
| 265 } |
| 266 |
| 261 void ServiceWorkerGlobalScopeProxy::didEvaluateWorkerScript(bool success) | 267 void ServiceWorkerGlobalScopeProxy::didEvaluateWorkerScript(bool success) |
| 262 { | 268 { |
| 269 DCHECK(m_workerGlobalScope); |
| 270 m_workerGlobalScope->didEvaluateWorkerScript(); |
| 263 client().didEvaluateWorkerScript(success); | 271 client().didEvaluateWorkerScript(success); |
| 264 } | 272 } |
| 265 | 273 |
| 266 void ServiceWorkerGlobalScopeProxy::didInitializeWorkerContext() | 274 void ServiceWorkerGlobalScopeProxy::didInitializeWorkerContext() |
| 267 { | 275 { |
| 268 ScriptState::Scope scope(workerGlobalScope()->scriptController()->getScriptS
tate()); | 276 ScriptState::Scope scope(workerGlobalScope()->scriptController()->getScriptS
tate()); |
| 269 client().didInitializeWorkerContext(workerGlobalScope()->scriptController()-
>context()); | 277 client().didInitializeWorkerContext(workerGlobalScope()->scriptController()-
>context()); |
| 270 } | 278 } |
| 271 | 279 |
| 272 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerOrWorkletGlob
alScope* workerGlobalScope) | 280 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerOrWorkletGlob
alScope* workerGlobalScope) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 return *m_document; | 331 return *m_document; |
| 324 } | 332 } |
| 325 | 333 |
| 326 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope() con
st | 334 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::workerGlobalScope() con
st |
| 327 { | 335 { |
| 328 DCHECK(m_workerGlobalScope); | 336 DCHECK(m_workerGlobalScope); |
| 329 return m_workerGlobalScope; | 337 return m_workerGlobalScope; |
| 330 } | 338 } |
| 331 | 339 |
| 332 } // namespace blink | 340 } // namespace blink |
| OLD | NEW |