| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes
sage) | 194 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes
sage) |
| 195 { | 195 { |
| 196 m_document.postInspectorTask(FROM_HERE, createCrossThreadTask(&WebEmbeddedWo
rkerImpl::postMessageToPageInspector, &m_embeddedWorker, message)); | 196 m_document.postInspectorTask(FROM_HERE, createCrossThreadTask(&WebEmbeddedWo
rkerImpl::postMessageToPageInspector, &m_embeddedWorker, message)); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void ServiceWorkerGlobalScopeProxy::didEvaluateWorkerScript(bool success) | 199 void ServiceWorkerGlobalScopeProxy::didEvaluateWorkerScript(bool success) |
| 200 { | 200 { |
| 201 m_client.didEvaluateWorkerScript(success); | 201 m_client.didEvaluateWorkerScript(success); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void ServiceWorkerGlobalScopeProxy::didInitializeWorkerContext(v8::Local<v8::Con
text> context) |
| 205 { |
| 206 m_client.didInitializeWorkerContext(context, WebURL(m_document.url())); |
| 207 } |
| 208 |
| 204 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerGlobalScope*
workerGlobalScope) | 209 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerGlobalScope*
workerGlobalScope) |
| 205 { | 210 { |
| 206 ASSERT(!m_workerGlobalScope); | 211 ASSERT(!m_workerGlobalScope); |
| 207 m_workerGlobalScope = static_cast<ServiceWorkerGlobalScope*>(workerGlobalSco
pe); | 212 m_workerGlobalScope = static_cast<ServiceWorkerGlobalScope*>(workerGlobalSco
pe); |
| 208 m_client.workerContextStarted(this); | 213 m_client.workerContextStarted(this); |
| 209 } | 214 } |
| 210 | 215 |
| 211 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed() | 216 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed() |
| 212 { | 217 { |
| 213 m_document.postTask(FROM_HERE, createCrossThreadTask(&WebEmbeddedWorkerImpl:
:terminateWorkerContext, &m_embeddedWorker)); | 218 m_document.postTask(FROM_HERE, createCrossThreadTask(&WebEmbeddedWorkerImpl:
:terminateWorkerContext, &m_embeddedWorker)); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 226 | 231 |
| 227 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) | 232 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) |
| 228 : m_embeddedWorker(embeddedWorker) | 233 : m_embeddedWorker(embeddedWorker) |
| 229 , m_document(document) | 234 , m_document(document) |
| 230 , m_client(client) | 235 , m_client(client) |
| 231 , m_workerGlobalScope(0) | 236 , m_workerGlobalScope(0) |
| 232 { | 237 { |
| 233 } | 238 } |
| 234 | 239 |
| 235 } // namespace blink | 240 } // namespace blink |
| OLD | NEW |