Chromium Code Reviews| 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 class WebDataConsumerHandle; | 42 class WebDataConsumerHandle; |
| 43 class WebServiceWorkerRequest; | 43 class WebServiceWorkerRequest; |
| 44 class WebServiceWorkerResponse; | 44 class WebServiceWorkerResponse; |
| 45 class WebString; | 45 class WebString; |
| 46 struct WebNotificationData; | 46 struct WebNotificationData; |
| 47 struct WebPaymentAppRequestData; | |
| 47 struct WebServiceWorkerClientInfo; | 48 struct WebServiceWorkerClientInfo; |
| 48 struct WebServiceWorkerError; | 49 struct WebServiceWorkerError; |
| 49 | 50 |
| 50 // A proxy interface to talk to the worker's GlobalScope implementation. | 51 // A proxy interface to talk to the worker's GlobalScope implementation. |
| 51 // All methods of this class must be called on the worker thread. | 52 // All methods of this class must be called on the worker thread. |
| 52 class WebServiceWorkerContextProxy { | 53 class WebServiceWorkerContextProxy { |
| 53 public: | 54 public: |
| 54 virtual ~WebServiceWorkerContextProxy() {} | 55 virtual ~WebServiceWorkerContextProxy() {} |
| 55 | 56 |
| 56 virtual void setRegistration( | 57 virtual void setRegistration( |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 89 virtual bool hasFetchEventHandler() = 0; | 90 virtual bool hasFetchEventHandler() = 0; |
| 90 | 91 |
| 91 enum LastChanceOption { IsNotLastChance, IsLastChance }; | 92 enum LastChanceOption { IsNotLastChance, IsLastChance }; |
| 92 | 93 |
| 93 // Once the ServiceWorker has finished handling the sync event, | 94 // Once the ServiceWorker has finished handling the sync event, |
| 94 // didHandleSyncEvent is called on the context client. | 95 // didHandleSyncEvent is called on the context client. |
| 95 virtual void dispatchSyncEvent(int syncEventID, | 96 virtual void dispatchSyncEvent(int syncEventID, |
| 96 const WebString& tag, | 97 const WebString& tag, |
| 97 LastChanceOption) = 0; | 98 LastChanceOption) = 0; |
| 98 | 99 |
| 100 virtual void dispatchPaymentRequestEvent(int eventID, | |
| 101 const WebPaymentAppRequestData&) = 0; | |
|
haraken
2016/11/24 04:41:54
Who calls this public method? I couldn't find it i
shimazu
2016/11/24 05:00:24
drive by:
I'm now mojofying IPCs related to dispat
| |
| 102 | |
| 99 virtual void onNavigationPreloadResponse( | 103 virtual void onNavigationPreloadResponse( |
| 100 int fetchEventID, | 104 int fetchEventID, |
| 101 std::unique_ptr<WebServiceWorkerResponse>, | 105 std::unique_ptr<WebServiceWorkerResponse>, |
| 102 std::unique_ptr<WebDataConsumerHandle>) = 0; | 106 std::unique_ptr<WebDataConsumerHandle>) = 0; |
| 103 virtual void onNavigationPreloadError( | 107 virtual void onNavigationPreloadError( |
| 104 int fetchEventID, | 108 int fetchEventID, |
| 105 std::unique_ptr<WebServiceWorkerError>) = 0; | 109 std::unique_ptr<WebServiceWorkerError>) = 0; |
| 106 }; | 110 }; |
| 107 | 111 |
| 108 } // namespace blink | 112 } // namespace blink |
| 109 | 113 |
| 110 #endif // WebServiceWorkerContextProxy_h | 114 #endif // WebServiceWorkerContextProxy_h |
| OLD | NEW |