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

Unified Diff: content/browser/service_worker/service_worker_version.h

Issue 2746783002: [ServiceWorker] Mojofy InstallEvent of Service Worker (Closed)
Patch Set: Just delete a useless line Created 3 years, 8 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
Index: content/browser/service_worker/service_worker_version.h
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index 7419d1174e8343a3d5db22c7a801518a379d1f78..917fe64bf6a7e3eb4836136bace13309dd57bb6c 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -264,6 +264,9 @@ class CONTENT_EXPORT ServiceWorkerVersion
bool was_handled,
base::Time dispatch_event_time);
+ void RegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes,
+ const std::vector<url::Origin>& origins);
+
// Finishes an external request that was started by StartExternalRequest().
// Returns false if there was an error finishing the request: e.g. the request
// was not found or the worker already terminated.
@@ -281,15 +284,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
return event_dispatcher_.get();
}
- // Dispatches an event. If dispatching the event fails, all of the error
- // callbacks that were associated with |request_ids| via StartRequest are
- // called.
- // Use RegisterRequestCallback to register a callback to receive messages sent
- // back in response to this event before calling this method. This must be
- // called when the worker is running.
- void DispatchEvent(const std::vector<int>& request_ids,
- const IPC::Message& message);
-
// This method registers a callback to receive messages sent back from the
// service worker in response to |request_id|.
// ResponseMessage is the type of the IPC message that is used for the
@@ -409,6 +403,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
private:
friend class base::RefCounted<ServiceWorkerVersion>;
+ friend class ServiceWorkerJobTest;
friend class ServiceWorkerMetrics;
friend class ServiceWorkerReadFromCacheJobTest;
friend class ServiceWorkerStallInStoppingTest;
@@ -420,6 +415,7 @@ class CONTENT_EXPORT ServiceWorkerVersion
ActivateWaitingVersion);
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerControlleeRequestHandlerTest,
FallbackWithNoFetchHandler);
+ FRIEND_TEST_ALL_PREFIXES(ServiceWorkerJobTest, Register);
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, IdleTimeout);
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, SetDevToolsAttached);
FRIEND_TEST_ALL_PREFIXES(ServiceWorkerVersionTest, StaleUpdate_FreshWorker);
@@ -616,9 +612,6 @@ class CONTENT_EXPORT ServiceWorkerVersion
void OnFocusClientFinished(int request_id,
const ServiceWorkerClientInfo& client_info);
- void OnRegisterForeignFetchScopes(const std::vector<GURL>& sub_scopes,
- const std::vector<url::Origin>& origins);
-
void DidEnsureLiveRegistrationForStartWorker(
ServiceWorkerMetrics::EventType purpose,
Status prestart_status,

Powered by Google App Engine
This is Rietveld 408576698