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 26 matching lines...) Expand all Loading... |
37 | 37 |
38 #include <memory> | 38 #include <memory> |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 struct WebBackgroundFetchSettledFetch; | 42 struct WebBackgroundFetchSettledFetch; |
43 class WebDataConsumerHandle; | 43 class WebDataConsumerHandle; |
44 class WebServiceWorkerRequest; | 44 class WebServiceWorkerRequest; |
45 class WebString; | 45 class WebString; |
46 struct WebNotificationData; | 46 struct WebNotificationData; |
47 struct WebPaymentAppRequest; | 47 struct WebPaymentRequestEventData; |
48 struct WebServiceWorkerClientInfo; | 48 struct WebServiceWorkerClientInfo; |
49 struct WebServiceWorkerError; | 49 struct WebServiceWorkerError; |
50 class WebURLResponse; | 50 class WebURLResponse; |
51 | 51 |
52 // A proxy interface to talk to the worker's GlobalScope implementation. | 52 // A proxy interface to talk to the worker's GlobalScope implementation. |
53 // All methods of this class must be called on the worker thread. | 53 // All methods of this class must be called on the worker thread. |
54 class WebServiceWorkerContextProxy { | 54 class WebServiceWorkerContextProxy { |
55 public: | 55 public: |
56 virtual ~WebServiceWorkerContextProxy() {} | 56 virtual ~WebServiceWorkerContextProxy() {} |
57 | 57 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 virtual bool HasFetchEventHandler() = 0; | 108 virtual bool HasFetchEventHandler() = 0; |
109 | 109 |
110 enum LastChanceOption { kIsNotLastChance, kIsLastChance }; | 110 enum LastChanceOption { kIsNotLastChance, kIsLastChance }; |
111 | 111 |
112 // Once the ServiceWorker has finished handling the sync event, | 112 // Once the ServiceWorker has finished handling the sync event, |
113 // didHandleSyncEvent is called on the context client. | 113 // didHandleSyncEvent is called on the context client. |
114 virtual void DispatchSyncEvent(int sync_event_id, | 114 virtual void DispatchSyncEvent(int sync_event_id, |
115 const WebString& tag, | 115 const WebString& tag, |
116 LastChanceOption) = 0; | 116 LastChanceOption) = 0; |
117 | 117 |
118 virtual void DispatchPaymentRequestEvent(int event_id, | 118 virtual void DispatchPaymentRequestEvent( |
119 const WebPaymentAppRequest&) = 0; | 119 int event_id, |
| 120 const WebPaymentRequestEventData&) = 0; |
120 | 121 |
121 virtual void OnNavigationPreloadResponse( | 122 virtual void OnNavigationPreloadResponse( |
122 int fetch_event_id, | 123 int fetch_event_id, |
123 std::unique_ptr<WebURLResponse>, | 124 std::unique_ptr<WebURLResponse>, |
124 std::unique_ptr<WebDataConsumerHandle>) = 0; | 125 std::unique_ptr<WebDataConsumerHandle>) = 0; |
125 virtual void OnNavigationPreloadError( | 126 virtual void OnNavigationPreloadError( |
126 int fetch_event_id, | 127 int fetch_event_id, |
127 std::unique_ptr<WebServiceWorkerError>) = 0; | 128 std::unique_ptr<WebServiceWorkerError>) = 0; |
128 virtual void OnNavigationPreloadComplete(int fetch_event_id, | 129 virtual void OnNavigationPreloadComplete(int fetch_event_id, |
129 double completion_time, | 130 double completion_time, |
130 int64_t encoded_data_length, | 131 int64_t encoded_data_length, |
131 int64_t encoded_body_length, | 132 int64_t encoded_body_length, |
132 int64_t decoded_body_length) = 0; | 133 int64_t decoded_body_length) = 0; |
133 }; | 134 }; |
134 | 135 |
135 } // namespace blink | 136 } // namespace blink |
136 | 137 |
137 #endif // WebServiceWorkerContextProxy_h | 138 #endif // WebServiceWorkerContextProxy_h |
OLD | NEW |