| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes
sage) | 64 void ServiceWorkerGlobalScopeProxy::postMessageToPageInspector(const String& mes
sage) |
| 65 { | 65 { |
| 66 m_client->dispatchDevToolsMessage(message); | 66 m_client->dispatchDevToolsMessage(message); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void ServiceWorkerGlobalScopeProxy::updateInspectorStateCookie(const String& mes
sage) | 69 void ServiceWorkerGlobalScopeProxy::updateInspectorStateCookie(const String& mes
sage) |
| 70 { | 70 { |
| 71 m_client->saveDevToolsAgentState(message); | 71 m_client->saveDevToolsAgentState(message); |
| 72 } | 72 } |
| 73 | 73 |
| 74 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted() | 74 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeStarted(WorkerGlobalScope*
workerGlobalScope) |
| 75 { | 75 { |
| 76 ASSERT(!m_workerGlobalScope); |
| 77 m_workerGlobalScope = workerGlobalScope; |
| 76 m_client->workerContextStarted(this); | 78 m_client->workerContextStarted(this); |
| 77 } | 79 } |
| 78 | 80 |
| 79 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed() | 81 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeClosed() |
| 80 { | 82 { |
| 81 m_executionContext.postTask(bind(&WebEmbeddedWorkerImpl::terminateWorkerCont
ext, &m_embeddedWorker)); | 83 m_executionContext.postTask(bind(&WebEmbeddedWorkerImpl::terminateWorkerCont
ext, &m_embeddedWorker)); |
| 82 } | 84 } |
| 83 | 85 |
| 84 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeDestroyed() | 86 void ServiceWorkerGlobalScopeProxy::workerGlobalScopeDestroyed() |
| 85 { | 87 { |
| 88 m_workerGlobalScope = 0; |
| 86 m_client->workerContextDestroyed(); | 89 m_client->workerContextDestroyed(); |
| 87 } | 90 } |
| 88 | 91 |
| 89 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, ExecutionContext& executionContext, PassOwnPtr<WebServiceWor
kerContextClient> client) | 92 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, ExecutionContext& executionContext, PassOwnPtr<WebServiceWor
kerContextClient> client) |
| 90 : m_embeddedWorker(embeddedWorker) | 93 : m_embeddedWorker(embeddedWorker) |
| 91 , m_executionContext(executionContext) | 94 , m_executionContext(executionContext) |
| 92 , m_client(client) | 95 , m_client(client) |
| 96 , m_workerGlobalScope(0) |
| 93 { | 97 { |
| 94 ASSERT(m_client); | 98 ASSERT(m_client); |
| 95 } | 99 } |
| 96 | 100 |
| 97 } // namespace blink | 101 } // namespace blink |
| OLD | NEW |