Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(171)

Side by Side Diff: third_party/WebKit/Source/modules/background_fetch/BackgroundFetchSettledRequest.h

Issue 2744873002: Implement the Request/Response bits of Background Fetch (Closed)
Patch Set: comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698