| 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 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 WorkerGlobalScope()->DispatchEvent(fetch_event); | 368 WorkerGlobalScope()->DispatchEvent(fetch_event); |
| 369 respond_with_observer->DidDispatchEvent(dispatch_result); | 369 respond_with_observer->DidDispatchEvent(dispatch_result); |
| 370 // false is okay because waitUntil for foreign fetch event doesn't care | 370 // false is okay because waitUntil for foreign fetch event doesn't care |
| 371 // about the promise rejection or an uncaught runtime script error. | 371 // about the promise rejection or an uncaught runtime script error. |
| 372 wait_until_observer->DidDispatchEvent(false /* errorOccurred */); | 372 wait_until_observer->DidDispatchEvent(false /* errorOccurred */); |
| 373 } | 373 } |
| 374 | 374 |
| 375 void ServiceWorkerGlobalScopeProxy::DispatchInstallEvent(int event_id) { | 375 void ServiceWorkerGlobalScopeProxy::DispatchInstallEvent(int event_id) { |
| 376 WaitUntilObserver* observer = WaitUntilObserver::Create( | 376 WaitUntilObserver* observer = WaitUntilObserver::Create( |
| 377 WorkerGlobalScope(), WaitUntilObserver::kInstall, event_id); | 377 WorkerGlobalScope(), WaitUntilObserver::kInstall, event_id); |
| 378 Event* event = InstallEvent::Create(EventTypeNames::install, | 378 Event* event = InstallEvent::Create( |
| 379 ExtendableEventInit(), observer); | 379 EventTypeNames::install, ExtendableEventInit(), event_id, observer); |
| 380 WorkerGlobalScope()->DispatchExtendableEvent(event, observer); | 380 WorkerGlobalScope()->DispatchExtendableEvent(event, observer); |
| 381 } | 381 } |
| 382 | 382 |
| 383 void ServiceWorkerGlobalScopeProxy::DispatchNotificationClickEvent( | 383 void ServiceWorkerGlobalScopeProxy::DispatchNotificationClickEvent( |
| 384 int event_id, | 384 int event_id, |
| 385 const WebString& notification_id, | 385 const WebString& notification_id, |
| 386 const WebNotificationData& data, | 386 const WebNotificationData& data, |
| 387 int action_index, | 387 int action_index, |
| 388 const WebString& reply) { | 388 const WebString& reply) { |
| 389 WaitUntilObserver* observer = WaitUntilObserver::Create( | 389 WaitUntilObserver* observer = WaitUntilObserver::Create( |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 return *document_; | 598 return *document_; |
| 599 } | 599 } |
| 600 | 600 |
| 601 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::WorkerGlobalScope() | 601 ServiceWorkerGlobalScope* ServiceWorkerGlobalScopeProxy::WorkerGlobalScope() |
| 602 const { | 602 const { |
| 603 DCHECK(worker_global_scope_); | 603 DCHECK(worker_global_scope_); |
| 604 return worker_global_scope_; | 604 return worker_global_scope_; |
| 605 } | 605 } |
| 606 | 606 |
| 607 } // namespace blink | 607 } // namespace blink |
| OLD | NEW |