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 to the document. | |
|
falken
2017/02/08 05:01:53
What is "the document" here? Does this mean this s
nhiroki
2017/02/09 05:11:31
No, this can be called for any controllee type. Up
| |
| 238 void CountFeature(uint32_t feature); | |
| 239 | |
| 237 // Adds reference of this host's process to the |pattern|, the reference will | 240 // Adds reference of this host's process to the |pattern|, the reference will |
| 238 // be removed in destructor. | 241 // be removed in destructor. |
| 239 void AddScopedProcessReferenceToPattern(const GURL& pattern); | 242 void AddScopedProcessReferenceToPattern(const GURL& pattern); |
| 240 | 243 |
| 241 // |registration| claims the document to be controlled. | 244 // |registration| claims the document to be controlled. |
| 242 void ClaimedByRegistration(ServiceWorkerRegistration* registration); | 245 void ClaimedByRegistration(ServiceWorkerRegistration* registration); |
| 243 | 246 |
| 244 // Called by dispatcher host to get the registration for the "ready" property. | 247 // 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. | 248 // 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 | 249 // 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_; | 409 bool allow_association_; |
| 407 | 410 |
| 408 std::vector<base::Closure> queued_events_; | 411 std::vector<base::Closure> queued_events_; |
| 409 | 412 |
| 410 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 413 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 411 }; | 414 }; |
| 412 | 415 |
| 413 } // namespace content | 416 } // namespace content |
| 414 | 417 |
| 415 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 418 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |