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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 // Dispatches message event to the document. | 129 // Dispatches message event to the document. |
130 void PostMessage(const base::string16& message, | 130 void PostMessage(const base::string16& message, |
131 const std::vector<int>& sent_message_port_ids); | 131 const std::vector<int>& sent_message_port_ids); |
132 | 132 |
133 // Activates the WebContents associated with | 133 // Activates the WebContents associated with |
134 // { render_process_id_, render_frame_id_ }. | 134 // { render_process_id_, render_frame_id_ }. |
135 // Runs the |callback| with the result in parameter describing whether the | 135 // Runs the |callback| with the result in parameter describing whether the |
136 // focusing action was successful. | 136 // focusing action was successful. |
137 void Focus(const FocusCallback& callback); | 137 void Focus(const FocusCallback& callback); |
138 | 138 |
| 139 // Asks the renderer to send back the document information. |
| 140 void GetClientInfo(int embedded_worker_id, int request_id); |
| 141 |
139 // Adds reference of this host's process to the |pattern|, the reference will | 142 // Adds reference of this host's process to the |pattern|, the reference will |
140 // be removed in destructor. | 143 // be removed in destructor. |
141 void AddScopedProcessReferenceToPattern(const GURL& pattern); | 144 void AddScopedProcessReferenceToPattern(const GURL& pattern); |
142 | 145 |
143 private: | 146 private: |
144 friend class ServiceWorkerProviderHostTest; | 147 friend class ServiceWorkerProviderHostTest; |
145 friend class ServiceWorkerWriteToCacheJobTest; | 148 friend class ServiceWorkerWriteToCacheJobTest; |
146 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, | 149 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, |
147 UpdateBefore24Hours); | 150 UpdateBefore24Hours); |
148 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, | 151 FRIEND_TEST_ALL_PREFIXES(ServiceWorkerContextRequestHandlerTest, |
(...skipping 29 matching lines...) Expand all Loading... |
178 base::WeakPtr<ServiceWorkerContextCore> context_; | 181 base::WeakPtr<ServiceWorkerContextCore> context_; |
179 ServiceWorkerDispatcherHost* dispatcher_host_; | 182 ServiceWorkerDispatcherHost* dispatcher_host_; |
180 bool allow_association_; | 183 bool allow_association_; |
181 | 184 |
182 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 185 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
183 }; | 186 }; |
184 | 187 |
185 } // namespace content | 188 } // namespace content |
186 | 189 |
187 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 190 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |