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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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::didHandleInstallEvent(int installEventI
D, WebServiceWorkerEventResult result) | 51 void ServiceWorkerGlobalScopeClientImpl::didHandleInstallEvent(int installEventI
D, WebServiceWorkerEventResult result) |
52 { | 52 { |
53 if (m_client) | 53 m_client->didHandleInstallEvent(installEventID, result); |
54 m_client->didHandleInstallEvent(installEventID, result); | |
55 } | 54 } |
56 | 55 |
57 void ServiceWorkerGlobalScopeClientImpl::didHandleFetchEvent(int fetchEventID, P
assRefPtr<WebCore::Response> response) | 56 void ServiceWorkerGlobalScopeClientImpl::didHandleFetchEvent(int fetchEventID, P
assRefPtr<WebCore::Response> response) |
58 { | 57 { |
59 if (!m_client) | |
60 return; | |
61 if (!response) { | 58 if (!response) { |
62 m_client->didHandleFetchEvent(fetchEventID); | 59 m_client->didHandleFetchEvent(fetchEventID); |
63 return; | 60 return; |
64 } | 61 } |
65 | 62 |
66 WebServiceWorkerResponse webResponse; | 63 WebServiceWorkerResponse webResponse; |
67 response->populateWebServiceWorkerResponse(webResponse); | 64 response->populateWebServiceWorkerResponse(webResponse); |
68 m_client->didHandleFetchEvent(fetchEventID, webResponse); | 65 m_client->didHandleFetchEvent(fetchEventID, webResponse); |
69 } | 66 } |
70 | 67 |
| 68 void ServiceWorkerGlobalScopeClientImpl::didHandleSyncEvent(int syncEventID) |
| 69 { |
| 70 m_client->didHandleSyncEvent(syncEventID); |
| 71 } |
| 72 |
71 ServiceWorkerGlobalScopeClientImpl::ServiceWorkerGlobalScopeClientImpl(PassOwnPt
r<WebServiceWorkerContextClient> client) | 73 ServiceWorkerGlobalScopeClientImpl::ServiceWorkerGlobalScopeClientImpl(PassOwnPt
r<WebServiceWorkerContextClient> client) |
72 : m_client(client) | 74 : m_client(client) |
73 { | 75 { |
74 } | 76 } |
75 | 77 |
76 } // namespace blink | 78 } // namespace blink |
OLD | NEW |