Chromium Code Reviews| 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 d2ed73600c9dc5dd282d303508ebefe442193d27..7b4d2d7927db9117c1e3e6618528e6d77d682805 100644 |
| --- a/content/browser/service_worker/service_worker_version.h |
| +++ b/content/browser/service_worker/service_worker_version.h |
| @@ -137,6 +137,10 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| } |
| ServiceWorkerVersionInfo GetInfo(); |
| Status status() const { return status_; } |
| + bool has_fetch_handler() const { return has_fetch_handler_; } |
| + void set_has_fetch_handler(bool has_fetch_handler) { |
| + has_fetch_handler_ = has_fetch_handler; |
| + } |
| const std::vector<GURL>& foreign_fetch_scopes() const { |
| return foreign_fetch_scopes_; |
| @@ -248,6 +252,11 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| template <typename ResponseMessage> |
| void DispatchSimpleEvent(int request_id, const IPC::Message& message); |
| + // For install event, the callback should be specialized to update the stat |
|
palmer
2016/05/23 21:31:32
I don't understand this comment. Can you rewrite i
shimazu
2016/05/24 04:17:46
Thanks for your review. I removed this code.
|
| + // of version object because |has_fetch_handler| should be set corresponding |
| + // to the result of script evaluation. |
| + void DispatchInstallEvent(int request_id); |
| + |
| // Adds and removes |provider_host| as a controllee of this ServiceWorker. |
| // A potential controllee is a host having the version as its .installing |
| // or .waiting version. |
| @@ -500,6 +509,9 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| void OnSimpleEventResponse(int request_id, |
| blink::WebServiceWorkerEventResult result); |
| + void OnInstallEventResponse(int request_id, |
| + blink::WebServiceWorkerEventResult result, |
| + bool has_fetch_handler); |
| void OnOpenWindow(int request_id, GURL url); |
| void OnOpenWindowFinished(int request_id, |
| ServiceWorkerStatusCode status, |
| @@ -603,6 +615,7 @@ class CONTENT_EXPORT ServiceWorkerVersion |
| const GURL scope_; |
| std::vector<GURL> foreign_fetch_scopes_; |
| std::vector<url::Origin> foreign_fetch_origins_; |
| + bool has_fetch_handler_ = true; |
| Status status_ = NEW; |
| std::unique_ptr<EmbeddedWorkerInstance> embedded_worker_; |