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

Side by Side Diff: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h

Issue 2699713003: [WIP] RespondWithObserver
Patch Set: RespondWithObserver Created 3 years, 10 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
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 27 matching lines...) Expand all
38 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall backs.h" 38 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCall backs.h"
39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h" 39 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h"
40 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h" 40 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h"
41 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb acks.h" 41 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallb acks.h"
42 #include "wtf/Forward.h" 42 #include "wtf/Forward.h"
43 #include "wtf/Noncopyable.h" 43 #include "wtf/Noncopyable.h"
44 #include <memory> 44 #include <memory>
45 45
46 namespace blink { 46 namespace blink {
47 47
48 struct WebPaymentAppResponse;
48 struct WebServiceWorkerClientQueryOptions; 49 struct WebServiceWorkerClientQueryOptions;
49 class ExecutionContext; 50 class ExecutionContext;
50 class WebServiceWorkerResponse; 51 class WebServiceWorkerResponse;
51 class WebURL; 52 class WebURL;
52 class WorkerClients; 53 class WorkerClients;
53 54
54 // See WebServiceWorkerContextClient for documentation for the methods in this 55 // See WebServiceWorkerContextClient for documentation for the methods in this
55 // class. 56 // class.
56 class MODULES_EXPORT ServiceWorkerGlobalScopeClient 57 class MODULES_EXPORT ServiceWorkerGlobalScopeClient
57 : public Supplement<WorkerClients> { 58 : public Supplement<WorkerClients> {
(...skipping 22 matching lines...) Expand all
80 virtual void didHandleExtendableMessageEvent(int eventID, 81 virtual void didHandleExtendableMessageEvent(int eventID,
81 WebServiceWorkerEventResult, 82 WebServiceWorkerEventResult,
82 double eventDispatchTime) = 0; 83 double eventDispatchTime) = 0;
83 // Calling respondToFetchEvent without response means no response was 84 // Calling respondToFetchEvent without response means no response was
84 // provided by the service worker in the fetch events, so fallback to native. 85 // provided by the service worker in the fetch events, so fallback to native.
85 virtual void respondToFetchEvent(int fetchEventID, 86 virtual void respondToFetchEvent(int fetchEventID,
86 double eventDispatchTime) = 0; 87 double eventDispatchTime) = 0;
87 virtual void respondToFetchEvent(int fetchEventID, 88 virtual void respondToFetchEvent(int fetchEventID,
88 const WebServiceWorkerResponse&, 89 const WebServiceWorkerResponse&,
89 double eventDispatchTime) = 0; 90 double eventDispatchTime) = 0;
91 virtual void respondToPaymentRequestEvent(int eventID,
92 const WebPaymentAppResponse&,
93 double eventDispatchTime) = 0;
90 virtual void didHandleFetchEvent(int fetchEventID, 94 virtual void didHandleFetchEvent(int fetchEventID,
91 WebServiceWorkerEventResult, 95 WebServiceWorkerEventResult,
92 double eventDispatchTime) = 0; 96 double eventDispatchTime) = 0;
93 virtual void didHandleInstallEvent(int installEventID, 97 virtual void didHandleInstallEvent(int installEventID,
94 WebServiceWorkerEventResult, 98 WebServiceWorkerEventResult,
95 double eventDispatchTime) = 0; 99 double eventDispatchTime) = 0;
96 virtual void didHandleNotificationClickEvent(int eventID, 100 virtual void didHandleNotificationClickEvent(int eventID,
97 WebServiceWorkerEventResult, 101 WebServiceWorkerEventResult,
98 double eventDispatchTime) = 0; 102 double eventDispatchTime) = 0;
99 virtual void didHandleNotificationCloseEvent(int eventID, 103 virtual void didHandleNotificationCloseEvent(int eventID,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 ServiceWorkerGlobalScopeClient() {} 136 ServiceWorkerGlobalScopeClient() {}
133 }; 137 };
134 138
135 MODULES_EXPORT void provideServiceWorkerGlobalScopeClientToWorker( 139 MODULES_EXPORT void provideServiceWorkerGlobalScopeClientToWorker(
136 WorkerClients*, 140 WorkerClients*,
137 ServiceWorkerGlobalScopeClient*); 141 ServiceWorkerGlobalScopeClient*);
138 142
139 } // namespace blink 143 } // namespace blink
140 144
141 #endif // ServiceWorkerGlobalScopeClient_h 145 #endif // ServiceWorkerGlobalScopeClient_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698