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

Unified Diff: content/renderer/service_worker/service_worker_context_client.h

Issue 2352173004: Mojoify FetchEvent of Service Worker. (Closed)
Patch Set: incorporated dcheng's comment Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/typemaps.gni ('k') | content/renderer/service_worker/service_worker_context_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/service_worker/service_worker_context_client.h
diff --git a/content/renderer/service_worker/service_worker_context_client.h b/content/renderer/service_worker/service_worker_context_client.h
index da4afca71072cce9a7c5871f73c1d9263146a2ba..6d6b246e2fe2be879d4fb46bcbaa13899a46d960 100644
--- a/content/renderer/service_worker/service_worker_context_client.h
+++ b/content/renderer/service_worker/service_worker_context_client.h
@@ -20,6 +20,7 @@
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "content/child/webmessageportchannel_impl.h"
+#include "content/common/service_worker/service_worker_status_code.h"
#include "content/common/service_worker/service_worker_types.h"
#include "ipc/ipc_listener.h"
#include "services/shell/public/interfaces/interface_provider.mojom.h"
@@ -67,6 +68,9 @@ class ServiceWorkerContextClient
using SyncCallback =
base::Callback<void(blink::mojom::ServiceWorkerEventStatus,
base::Time /* dispatch_event_time */)>;
+ using FetchCallback =
+ base::Callback<void(ServiceWorkerStatusCode,
+ base::Time /* dispatch_event_time */)>;
// Returns a thread-specific client instance. This does NOT create a
// new instance.
@@ -194,6 +198,7 @@ class ServiceWorkerContextClient
private:
struct WorkerContextData;
+ class FetchEventDispatcherImpl;
// Get routing_id for sending message to the ServiceWorkerVersion
// in the browser process.
@@ -210,9 +215,9 @@ class ServiceWorkerContextClient
int request_id,
const ServiceWorkerMsg_ExtendableMessageEvent_Params& params);
void OnInstallEvent(int request_id);
- void OnFetchEvent(int response_id,
- int event_finish_id,
- const ServiceWorkerFetchRequest& request);
+ void DispatchFetchEvent(int response_id,
+ const ServiceWorkerFetchRequest& request,
+ const FetchCallback& callback);
void OnNotificationClickEvent(
int request_id,
const std::string& notification_id,
« no previous file with comments | « content/common/typemaps.gni ('k') | content/renderer/service_worker/service_worker_context_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698