Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 | 227 |
| 228 // Returns true if the context referred to by this host (i.e. |context_|) is | 228 // Returns true if the context referred to by this host (i.e. |context_|) is |
| 229 // still alive. | 229 // still alive. |
| 230 bool IsContextAlive(); | 230 bool IsContextAlive(); |
| 231 | 231 |
| 232 // Dispatches message event to the document. | 232 // Dispatches message event to the document. |
| 233 void PostMessageToClient(ServiceWorkerVersion* version, | 233 void PostMessageToClient(ServiceWorkerVersion* version, |
| 234 const base::string16& message, | 234 const base::string16& message, |
| 235 const std::vector<int>& sent_message_ports); | 235 const std::vector<int>& sent_message_ports); |
| 236 | 236 |
| 237 // Notifies an API use on the worker to the controllee's use counter. This | |
| 238 // should be called only on controllee's provider host. | |
|
falken
2017/02/09 06:03:58
It's a little hard to parse this. Suggestion: "Not
nhiroki
2017/02/13 05:42:09
Done.
| |
| 239 void CountFeature(uint32_t feature); | |
| 240 | |
| 237 // Adds reference of this host's process to the |pattern|, the reference will | 241 // Adds reference of this host's process to the |pattern|, the reference will |
| 238 // be removed in destructor. | 242 // be removed in destructor. |
| 239 void AddScopedProcessReferenceToPattern(const GURL& pattern); | 243 void AddScopedProcessReferenceToPattern(const GURL& pattern); |
| 240 | 244 |
| 241 // |registration| claims the document to be controlled. | 245 // |registration| claims the document to be controlled. |
| 242 void ClaimedByRegistration(ServiceWorkerRegistration* registration); | 246 void ClaimedByRegistration(ServiceWorkerRegistration* registration); |
| 243 | 247 |
| 244 // Called by dispatcher host to get the registration for the "ready" property. | 248 // Called by dispatcher host to get the registration for the "ready" property. |
| 245 // Returns false if there's a completed or ongoing request for the document. | 249 // Returns false if there's a completed or ongoing request for the document. |
| 246 // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator- service-worker-ready | 250 // https://slightlyoff.github.io/ServiceWorker/spec/service_worker/#navigator- service-worker-ready |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 406 bool allow_association_; | 410 bool allow_association_; |
| 407 | 411 |
| 408 std::vector<base::Closure> queued_events_; | 412 std::vector<base::Closure> queued_events_; |
| 409 | 413 |
| 410 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 414 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 411 }; | 415 }; |
| 412 | 416 |
| 413 } // namespace content | 417 } // namespace content |
| 414 | 418 |
| 415 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 419 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |