| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 PassOwnPtr<WebCore::ServiceWorkerGlobalScopeClient> ServiceWorkerGlobalScopeClie
ntImpl::create(PassOwnPtr<WebServiceWorkerContextClient> client) | 42 PassOwnPtr<WebCore::ServiceWorkerGlobalScopeClient> ServiceWorkerGlobalScopeClie
ntImpl::create(PassOwnPtr<WebServiceWorkerContextClient> client) |
| 43 { | 43 { |
| 44 return adoptPtr(new ServiceWorkerGlobalScopeClientImpl(client)); | 44 return adoptPtr(new ServiceWorkerGlobalScopeClientImpl(client)); |
| 45 } | 45 } |
| 46 | 46 |
| 47 ServiceWorkerGlobalScopeClientImpl::~ServiceWorkerGlobalScopeClientImpl() | 47 ServiceWorkerGlobalScopeClientImpl::~ServiceWorkerGlobalScopeClientImpl() |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 void ServiceWorkerGlobalScopeClientImpl::didHandleActivateEvent(int eventID, Web
ServiceWorkerEventResult result) |
| 52 { |
| 53 m_client->didHandleActivateEvent(eventID, result); |
| 54 } |
| 55 |
| 51 void ServiceWorkerGlobalScopeClientImpl::didHandleInstallEvent(int installEventI
D, WebServiceWorkerEventResult result) | 56 void ServiceWorkerGlobalScopeClientImpl::didHandleInstallEvent(int installEventI
D, WebServiceWorkerEventResult result) |
| 52 { | 57 { |
| 53 m_client->didHandleInstallEvent(installEventID, result); | 58 m_client->didHandleInstallEvent(installEventID, result); |
| 54 } | 59 } |
| 55 | 60 |
| 56 void ServiceWorkerGlobalScopeClientImpl::didHandleFetchEvent(int fetchEventID, P
assRefPtr<WebCore::Response> response) | 61 void ServiceWorkerGlobalScopeClientImpl::didHandleFetchEvent(int fetchEventID, P
assRefPtr<WebCore::Response> response) |
| 57 { | 62 { |
| 58 if (!response) { | 63 if (!response) { |
| 59 m_client->didHandleFetchEvent(fetchEventID); | 64 m_client->didHandleFetchEvent(fetchEventID); |
| 60 return; | 65 return; |
| 61 } | 66 } |
| 62 | 67 |
| 63 WebServiceWorkerResponse webResponse; | 68 WebServiceWorkerResponse webResponse; |
| 64 response->populateWebServiceWorkerResponse(webResponse); | 69 response->populateWebServiceWorkerResponse(webResponse); |
| 65 m_client->didHandleFetchEvent(fetchEventID, webResponse); | 70 m_client->didHandleFetchEvent(fetchEventID, webResponse); |
| 66 } | 71 } |
| 67 | 72 |
| 68 void ServiceWorkerGlobalScopeClientImpl::didHandleSyncEvent(int syncEventID) | 73 void ServiceWorkerGlobalScopeClientImpl::didHandleSyncEvent(int syncEventID) |
| 69 { | 74 { |
| 70 m_client->didHandleSyncEvent(syncEventID); | 75 m_client->didHandleSyncEvent(syncEventID); |
| 71 } | 76 } |
| 72 | 77 |
| 73 ServiceWorkerGlobalScopeClientImpl::ServiceWorkerGlobalScopeClientImpl(PassOwnPt
r<WebServiceWorkerContextClient> client) | 78 ServiceWorkerGlobalScopeClientImpl::ServiceWorkerGlobalScopeClientImpl(PassOwnPt
r<WebServiceWorkerContextClient> client) |
| 74 : m_client(client) | 79 : m_client(client) |
| 75 { | 80 { |
| 81 ASSERT(m_client); |
| 76 } | 82 } |
| 77 | 83 |
| 78 } // namespace blink | 84 } // namespace blink |
| OLD | NEW |