| 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 28 matching lines...) Expand all Loading... |
| 39 #include "public/platform/modules/serviceworker/WebServiceWorkerRegistration.h" | 39 #include "public/platform/modules/serviceworker/WebServiceWorkerRegistration.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class WebServiceWorkerRequest; | 43 class WebServiceWorkerRequest; |
| 44 class WebString; | 44 class WebString; |
| 45 struct WebCircularGeofencingRegion; | 45 struct WebCircularGeofencingRegion; |
| 46 struct WebCrossOriginServiceWorkerClient; | 46 struct WebCrossOriginServiceWorkerClient; |
| 47 struct WebNotificationData; | 47 struct WebNotificationData; |
| 48 struct WebServiceWorkerClientInfo; | 48 struct WebServiceWorkerClientInfo; |
| 49 struct WebSyncRegistration; | |
| 50 | 49 |
| 51 // A proxy interface to talk to the worker's GlobalScope implementation. | 50 // A proxy interface to talk to the worker's GlobalScope implementation. |
| 52 // All methods of this class must be called on the worker thread. | 51 // All methods of this class must be called on the worker thread. |
| 53 class WebServiceWorkerContextProxy { | 52 class WebServiceWorkerContextProxy { |
| 54 public: | 53 public: |
| 55 virtual ~WebServiceWorkerContextProxy() { } | 54 virtual ~WebServiceWorkerContextProxy() { } |
| 56 | 55 |
| 57 virtual void setRegistration(WebPassOwnPtr<WebServiceWorkerRegistration::Han
dle>) = 0; | 56 virtual void setRegistration(WebPassOwnPtr<WebServiceWorkerRegistration::Han
dle>) = 0; |
| 58 | 57 |
| 59 virtual void dispatchActivateEvent(int eventID) = 0; | 58 virtual void dispatchActivateEvent(int eventID) = 0; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 76 // Passes ownership of the callbacks. | 75 // Passes ownership of the callbacks. |
| 77 virtual void dispatchServicePortConnectEvent(WebServicePortConnectEventCallb
acks*, const WebURL& targetURL, const WebString& origin, WebServicePortID) = 0; | 76 virtual void dispatchServicePortConnectEvent(WebServicePortConnectEventCallb
acks*, const WebURL& targetURL, const WebString& origin, WebServicePortID) = 0; |
| 78 | 77 |
| 79 enum LastChanceOption { | 78 enum LastChanceOption { |
| 80 IsNotLastChance, | 79 IsNotLastChance, |
| 81 IsLastChance | 80 IsLastChance |
| 82 }; | 81 }; |
| 83 | 82 |
| 84 // Once the ServiceWorker has finished handling the sync event, | 83 // Once the ServiceWorker has finished handling the sync event, |
| 85 // didHandleSyncEvent is called on the context client. | 84 // didHandleSyncEvent is called on the context client. |
| 86 virtual void dispatchSyncEvent(int syncEventID, const WebSyncRegistration&,
LastChanceOption) = 0; | 85 virtual void dispatchSyncEvent(int syncEventID, const WebString& tag, LastCh
anceOption) = 0; |
| 87 }; | 86 }; |
| 88 | 87 |
| 89 } // namespace blink | 88 } // namespace blink |
| 90 | 89 |
| 91 #endif // WebServiceWorkerContextProxy_h | 90 #endif // WebServiceWorkerContextProxy_h |
| OLD | NEW |