| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 { | 101 { |
| 102 ASSERT(m_workerGlobalScope); | 102 ASSERT(m_workerGlobalScope); |
| 103 const AtomicString& type = eventType == WebGeofencingEventTypeEnter ? EventT
ypeNames::geofenceenter : EventTypeNames::geofenceleave; | 103 const AtomicString& type = eventType == WebGeofencingEventTypeEnter ? EventT
ypeNames::geofenceenter : EventTypeNames::geofenceleave; |
| 104 m_workerGlobalScope->dispatchEvent(GeofencingEvent::create(type, regionID, C
ircularGeofencingRegion::create(regionID, region))); | 104 m_workerGlobalScope->dispatchEvent(GeofencingEvent::create(type, regionID, C
ircularGeofencingRegion::create(regionID, region))); |
| 105 } | 105 } |
| 106 | 106 |
| 107 void ServiceWorkerGlobalScopeProxy::dispatchInstallEvent(int eventID) | 107 void ServiceWorkerGlobalScopeProxy::dispatchInstallEvent(int eventID) |
| 108 { | 108 { |
| 109 ASSERT(m_workerGlobalScope); | 109 ASSERT(m_workerGlobalScope); |
| 110 WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope,
WaitUntilObserver::Install, eventID); | 110 WaitUntilObserver* observer = WaitUntilObserver::create(m_workerGlobalScope,
WaitUntilObserver::Install, eventID); |
| 111 RefPtrWillBeRawPtr<Event> event(InstallEvent::create(EventTypeNames::install
, EventInit(), observer)); | 111 RefPtrWillBeRawPtr<Event> event(InstallEvent::create(EventTypeNames::install
, InstallEventInit(), observer)); |
| 112 m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer); | 112 m_workerGlobalScope->dispatchExtendableEvent(event.release(), observer); |
| 113 } | 113 } |
| 114 | 114 |
| 115 void ServiceWorkerGlobalScopeProxy::dispatchMessageEvent(const WebString& messag
e, const WebMessagePortChannelArray& webChannels) | 115 void ServiceWorkerGlobalScopeProxy::dispatchMessageEvent(const WebString& messag
e, const WebMessagePortChannelArray& webChannels) |
| 116 { | 116 { |
| 117 ASSERT(m_workerGlobalScope); | 117 ASSERT(m_workerGlobalScope); |
| 118 | 118 |
| 119 OwnPtrWillBeRawPtr<MessagePortArray> ports = MessagePort::toMessagePortArray
(m_workerGlobalScope, webChannels); | 119 OwnPtrWillBeRawPtr<MessagePortArray> ports = MessagePort::toMessagePortArray
(m_workerGlobalScope, webChannels); |
| 120 WebSerializedScriptValue value = WebSerializedScriptValue::fromString(messag
e); | 120 WebSerializedScriptValue value = WebSerializedScriptValue::fromString(messag
e); |
| 121 m_workerGlobalScope->dispatchEvent(MessageEvent::create(ports.release(), val
ue)); | 121 m_workerGlobalScope->dispatchEvent(MessageEvent::create(ports.release(), val
ue)); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 192 |
| 193 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) | 193 ServiceWorkerGlobalScopeProxy::ServiceWorkerGlobalScopeProxy(WebEmbeddedWorkerIm
pl& embeddedWorker, Document& document, WebServiceWorkerContextClient& client) |
| 194 : m_embeddedWorker(embeddedWorker) | 194 : m_embeddedWorker(embeddedWorker) |
| 195 , m_document(document) | 195 , m_document(document) |
| 196 , m_client(client) | 196 , m_client(client) |
| 197 , m_workerGlobalScope(0) | 197 , m_workerGlobalScope(0) |
| 198 { | 198 { |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace blink | 201 } // namespace blink |
| OLD | NEW |