| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // A proxy interface to talk to the worker's GlobalScope implementation. | 51 // A proxy interface to talk to the worker's GlobalScope implementation. |
| 52 // 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. |
| 53 class WebServiceWorkerContextProxy { | 53 class WebServiceWorkerContextProxy { |
| 54 public: | 54 public: |
| 55 virtual ~WebServiceWorkerContextProxy() {} | 55 virtual ~WebServiceWorkerContextProxy() {} |
| 56 | 56 |
| 57 virtual void setRegistration( | 57 virtual void setRegistration( |
| 58 std::unique_ptr<WebServiceWorkerRegistration::Handle>) = 0; | 58 std::unique_ptr<WebServiceWorkerRegistration::Handle>) = 0; |
| 59 | 59 |
| 60 virtual void dispatchActivateEvent(int eventID) = 0; | 60 virtual void dispatchActivateEvent(int eventID) = 0; |
| 61 |
| 62 enum class BackgroundFetchState { Pending, Succeeded, Failed }; |
| 63 |
| 64 virtual void dispatchBackgroundFetchAbortEvent(int eventID, |
| 65 const WebString& tag) = 0; |
| 66 virtual void dispatchBackgroundFetchClickEvent( |
| 67 int eventID, |
| 68 const WebString& tag, |
| 69 BackgroundFetchState status) = 0; |
| 70 |
| 61 virtual void dispatchExtendableMessageEvent( | 71 virtual void dispatchExtendableMessageEvent( |
| 62 int eventID, | 72 int eventID, |
| 63 const WebString& message, | 73 const WebString& message, |
| 64 const WebSecurityOrigin& sourceOrigin, | 74 const WebSecurityOrigin& sourceOrigin, |
| 65 WebMessagePortChannelArray, | 75 WebMessagePortChannelArray, |
| 66 const WebServiceWorkerClientInfo&) = 0; | 76 const WebServiceWorkerClientInfo&) = 0; |
| 67 virtual void dispatchExtendableMessageEvent( | 77 virtual void dispatchExtendableMessageEvent( |
| 68 int eventID, | 78 int eventID, |
| 69 const WebString& message, | 79 const WebString& message, |
| 70 const WebSecurityOrigin& sourceOrigin, | 80 const WebSecurityOrigin& sourceOrigin, |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 std::unique_ptr<WebURLResponse>, | 115 std::unique_ptr<WebURLResponse>, |
| 106 std::unique_ptr<WebDataConsumerHandle>) = 0; | 116 std::unique_ptr<WebDataConsumerHandle>) = 0; |
| 107 virtual void onNavigationPreloadError( | 117 virtual void onNavigationPreloadError( |
| 108 int fetchEventID, | 118 int fetchEventID, |
| 109 std::unique_ptr<WebServiceWorkerError>) = 0; | 119 std::unique_ptr<WebServiceWorkerError>) = 0; |
| 110 }; | 120 }; |
| 111 | 121 |
| 112 } // namespace blink | 122 } // namespace blink |
| 113 | 123 |
| 114 #endif // WebServiceWorkerContextProxy_h | 124 #endif // WebServiceWorkerContextProxy_h |
| OLD | NEW |