| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 ASSERT(m_workerGlobalScope); | 72 ASSERT(m_workerGlobalScope); |
| 73 WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope,
WaitUntilObserver::Install, eventID); | 73 WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope,
WaitUntilObserver::Install, eventID); |
| 74 RefPtrWillBeRawPtr<Event> event(InstallEvent::create(EventTypeNames::install
, EventInit(), observer)); | 74 RefPtrWillBeRawPtr<Event> event(InstallEvent::create(EventTypeNames::install
, EventInit(), observer)); |
| 75 m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer); | 75 m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void ServiceWorkerGlobalScopeProxy::dispatchActivateEvent(int eventID) | 78 void ServiceWorkerGlobalScopeProxy::dispatchActivateEvent(int eventID) |
| 79 { | 79 { |
| 80 ASSERT(m_workerGlobalScope); | 80 ASSERT(m_workerGlobalScope); |
| 81 WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope,
WaitUntilObserver::Activate, eventID); | 81 WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope,
WaitUntilObserver::Activate, eventID); |
| 82 RefPtrWillBeRawPtr<Event> event(ExtendableEvent::create(EventTypeNames::acti
vate, EventInit(), observer)); | 82 RefPtrWillBeRawPtr<Event> event(ExtendableEvent::create(EventTypeNames::acti
vate, ExtendableEventInit(), observer)); |
| 83 m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer); | 83 m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer); |
| 84 } | 84 } |
| 85 | 85 |
| 86 void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebSer
viceWorkerRequest& webRequest) | 86 void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebSer
viceWorkerRequest& webRequest) |
| 87 { | 87 { |
| 88 ASSERT(m_workerGlobalScope); | 88 ASSERT(m_workerGlobalScope); |
| 89 RespondWithObserver* observer = RespondWithObserver::create(m_workerGlobalSc
ope, eventID, webRequest.mode(), webRequest.frameType()); | 89 RespondWithObserver* observer = RespondWithObserver::create(m_workerGlobalSc
ope, eventID, webRequest.mode(), webRequest.frameType()); |
| 90 if (!RuntimeEnabledFeatures::serviceWorkerOnFetchEnabled()) { | 90 if (!RuntimeEnabledFeatures::serviceWorkerOnFetchEnabled()) { |
| 91 observer->didDispatchEvent(); | 91 observer->didDispatchEvent(); |
| 92 return; | 92 return; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) | 179 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) |
| 180 : m_embeddedWorker(embeddedWorker) | 180 : m_embeddedWorker(embeddedWorker) |
| 181 , m_document(document) | 181 , m_document(document) |
| 182 , m_client(client) | 182 , m_client(client) |
| 183 , m_workerGlobalScope(0) | 183 , m_workerGlobalScope(0) |
| 184 { | 184 { |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace blink | 187 } // namespace blink |
| OLD | NEW |