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

Side by Side Diff: content/public/browser/service_worker_context.h

Issue 2924213002: Draft: Dispatching extension events to stopped extension SW.
Patch Set: rebase @tott Created 3 years, 6 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_
6 #define CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_ 6 #define CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // shut the worker down while embedder is expecting the worker to be kept 100 // shut the worker down while embedder is expecting the worker to be kept
101 // alive. 101 // alive.
102 // 102 //
103 // Must be called from the IO thread. Returns whether or not changing the ref 103 // Must be called from the IO thread. Returns whether or not changing the ref
104 // count succeeded. 104 // count succeeded.
105 virtual bool StartingExternalRequest(int64_t service_worker_version_id, 105 virtual bool StartingExternalRequest(int64_t service_worker_version_id,
106 const std::string& request_uuid) = 0; 106 const std::string& request_uuid) = 0;
107 virtual bool FinishedExternalRequest(int64_t service_worker_version_id, 107 virtual bool FinishedExternalRequest(int64_t service_worker_version_id,
108 const std::string& request_uuid) = 0; 108 const std::string& request_uuid) = 0;
109 109
110 // Starts a previously registered worker at |origin| and returns running
111 // worker info via |info_callback|.
112 // Returned info contains worker render process id and worker thread id.
113 // Must be called on IO thread.
114 virtual void GetWorkerInfoAfterStartWorker(
115 const GURL& origin,
116 base::OnceCallback<void(int, int)> info_callback,
117 base::OnceCallback<void()> failure_callback) = 0;
118
110 // Equivalent to calling navigator.serviceWorker.unregister(pattern) from a 119 // Equivalent to calling navigator.serviceWorker.unregister(pattern) from a
111 // renderer, except that |pattern| is an absolute URL instead of relative to 120 // renderer, except that |pattern| is an absolute URL instead of relative to
112 // some current origin. |callback| is passed true when the JS promise is 121 // some current origin. |callback| is passed true when the JS promise is
113 // fulfilled or false when the JS promise is rejected. 122 // fulfilled or false when the JS promise is rejected.
114 // 123 //
115 // Unregistration can fail if: 124 // Unregistration can fail if:
116 // * No Service Worker was registered for |pattern|. 125 // * No Service Worker was registered for |pattern|.
117 // * Something unexpected goes wrong, like a renderer crash. 126 // * Something unexpected goes wrong, like a renderer crash.
118 // 127 //
119 // This function can be called from any thread, but the callback will always 128 // This function can be called from any thread, but the callback will always
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 const StartServiceWorkerForNavigationHintCallback& callback) = 0; 183 const StartServiceWorkerForNavigationHintCallback& callback) = 0;
175 184
176 protected: 185 protected:
177 ServiceWorkerContext() {} 186 ServiceWorkerContext() {}
178 virtual ~ServiceWorkerContext() {} 187 virtual ~ServiceWorkerContext() {}
179 }; 188 };
180 189
181 } // namespace content 190 } // namespace content
182 191
183 #endif // CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_ 192 #endif // CONTENT_PUBLIC_BROWSER_SERVICE_WORKER_CONTEXT_H_
OLDNEW
« no previous file with comments | « content/browser/service_worker/service_worker_context_wrapper.cc ('k') | content/public/renderer/content_renderer_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698