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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 RefPtr<WaitUntilObserver> observer = WaitUntilObserver::create(m_workerGloba
lScope, WaitUntilObserver::Activate, eventID); | 78 RefPtr<WaitUntilObserver> observer = WaitUntilObserver::create(m_workerGloba
lScope, WaitUntilObserver::Activate, eventID); |
79 observer->willDispatchEvent(); | 79 observer->willDispatchEvent(); |
80 m_workerGlobalScope->dispatchEvent(InstallPhaseEvent::create(EventTypeNames:
:activate, EventInit(), observer)); | 80 m_workerGlobalScope->dispatchEvent(InstallPhaseEvent::create(EventTypeNames:
:activate, EventInit(), observer)); |
81 observer->didDispatchEvent(); | 81 observer->didDispatchEvent(); |
82 } | 82 } |
83 | 83 |
84 void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebSer
viceWorkerRequest& webRequest) | 84 void ServiceWorkerGlobalScopeProxy::dispatchFetchEvent(int eventID, const WebSer
viceWorkerRequest& webRequest) |
85 { | 85 { |
86 ASSERT(m_workerGlobalScope); | 86 ASSERT(m_workerGlobalScope); |
87 RefPtr<RespondWithObserver> observer = RespondWithObserver::create(m_workerG
lobalScope, eventID); | 87 RefPtr<RespondWithObserver> observer = RespondWithObserver::create(m_workerG
lobalScope, eventID); |
88 RefPtr<Request> request = Request::create(webRequest); | 88 RefPtrWillBeRawPtr<Request> request = Request::create(webRequest); |
89 RefPtrWillBeRawPtr<FetchEvent> fetchEvent(FetchEvent::create(observer, reque
st)); | 89 RefPtrWillBeRawPtr<FetchEvent> fetchEvent(FetchEvent::create(observer, reque
st)); |
90 fetchEvent->setIsReload(webRequest.isReload()); | 90 fetchEvent->setIsReload(webRequest.isReload()); |
91 m_workerGlobalScope->dispatchEvent(fetchEvent.release()); | 91 m_workerGlobalScope->dispatchEvent(fetchEvent.release()); |
92 observer->didDispatchEvent(); | 92 observer->didDispatchEvent(); |
93 } | 93 } |
94 | 94 |
95 void ServiceWorkerGlobalScopeProxy::dispatchMessageEvent(const WebString& messag
e, const WebMessagePortChannelArray& webChannels) | 95 void ServiceWorkerGlobalScopeProxy::dispatchMessageEvent(const WebString& messag
e, const WebMessagePortChannelArray& webChannels) |
96 { | 96 { |
97 ASSERT(m_workerGlobalScope); | 97 ASSERT(m_workerGlobalScope); |
98 | 98 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, ExecutionContext& executionContext, WebServiceWorkerContextC
lient& client) | 160 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, ExecutionContext& executionContext, WebServiceWorkerContextC
lient& client) |
161 : m_embeddedWorker(embeddedWorker) | 161 : m_embeddedWorker(embeddedWorker) |
162 , m_executionContext(executionContext) | 162 , m_executionContext(executionContext) |
163 , m_client(client) | 163 , m_client(client) |
164 , m_workerGlobalScope(0) | 164 , m_workerGlobalScope(0) |
165 { | 165 { |
166 } | 166 } |
167 | 167 |
168 } // namespace blink | 168 } // namespace blink |
OLD | NEW |