| 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 <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 // Dispatches message event to the document. | 126 // Dispatches message event to the document. |
| 127 void PostMessage(const base::string16& message, | 127 void PostMessage(const base::string16& message, |
| 128 const std::vector<int>& sent_message_port_ids); | 128 const std::vector<int>& sent_message_port_ids); |
| 129 | 129 |
| 130 // Adds reference of this host's process to the |pattern|, the reference will | 130 // Adds reference of this host's process to the |pattern|, the reference will |
| 131 // be removed in destructor. | 131 // be removed in destructor. |
| 132 void AddScopedProcessReferenceToPattern(const GURL& pattern); | 132 void AddScopedProcessReferenceToPattern(const GURL& pattern); |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 friend class ServiceWorkerProviderHostTest; | 135 friend class ServiceWorkerProviderHostTest; |
| 136 friend class ServiceWorkerWriteToCacheJobTest; |
| 136 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, | 137 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, |
| 137 UpdateBefore24Hours); | 138 UpdateBefore24Hours); |
| 138 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, | 139 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, |
| 139 UpdateAfter24Hours); | 140 UpdateAfter24Hours); |
| 140 | 141 |
| 141 // ServiceWorkerRegistration::Listener overrides. | 142 // ServiceWorkerRegistration::Listener overrides. |
| 142 void OnRegistrationFailed(ServiceWorkerRegistration* registration) override; | 143 void OnRegistrationFailed(ServiceWorkerRegistration* registration) override; |
| 143 | 144 |
| 144 // Sets the controller version field to |version| or if |version| is NULL, | 145 // Sets the controller version field to |version| or if |version| is NULL, |
| 145 // clears the field. | 146 // clears the field. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 167 base::WeakPtr<ServiceWorkerContextCore> context_; | 168 base::WeakPtr<ServiceWorkerContextCore> context_; |
| 168 ServiceWorkerDispatcherHost* dispatcher_host_; | 169 ServiceWorkerDispatcherHost* dispatcher_host_; |
| 169 bool allow_association_; | 170 bool allow_association_; |
| 170 | 171 |
| 171 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 172 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
| 172 }; | 173 }; |
| 173 | 174 |
| 174 } // namespace content | 175 } // namespace content |
| 175 | 176 |
| 176 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 177 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
| OLD | NEW |