| OLD | NEW |
| (Empty) |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef BackgroundFetchSettledRequest_h | |
| 6 #define BackgroundFetchSettledRequest_h | |
| 7 | |
| 8 #include "modules/background_fetch/BackgroundFetchRequest.h" | |
| 9 #include "platform/heap/Handle.h" | |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class Request; | |
| 14 class Response; | |
| 15 | |
| 16 // Interface for providing developers access to the Request/Response pairs when | |
| 17 // a background fetch has settled, either through the `backgroundfetched` event | |
| 18 // in case of success, or `backgroundfetchfail` in case of failure. | |
| 19 class BackgroundFetchSettledRequest final : public BackgroundFetchRequest { | |
| 20 DEFINE_WRAPPERTYPEINFO(); | |
| 21 | |
| 22 public: | |
| 23 static BackgroundFetchSettledRequest* create(Request* request, | |
| 24 Response* response) { | |
| 25 return new BackgroundFetchSettledRequest(request, response); | |
| 26 } | |
| 27 | |
| 28 // Web Exposed attribute defined in the IDL file. | |
| 29 Response* response() const; | |
| 30 | |
| 31 DECLARE_VIRTUAL_TRACE(); | |
| 32 | |
| 33 private: | |
| 34 BackgroundFetchSettledRequest(Request*, Response*); | |
| 35 | |
| 36 Member<Response> m_response; | |
| 37 }; | |
| 38 | |
| 39 } // namespace blink | |
| 40 | |
| 41 #endif // BackgroundFetchSettledRequest_h | |
| OLD | NEW |