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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 // For use by the ServiceWorkerControlleeRequestHandler to disallow | 136 // For use by the ServiceWorkerControlleeRequestHandler to disallow |
137 // new registration association while a navigation is occurring and | 137 // new registration association while a navigation is occurring and |
138 // an existing registration is being looked for. | 138 // an existing registration is being looked for. |
139 void SetAllowAssociation(bool allow) { allow_association_ = allow; } | 139 void SetAllowAssociation(bool allow) { allow_association_ = allow; } |
140 | 140 |
141 // Returns true if the context referred to by this host (i.e. |context_|) is | 141 // Returns true if the context referred to by this host (i.e. |context_|) is |
142 // still alive. | 142 // still alive. |
143 bool IsContextAlive(); | 143 bool IsContextAlive(); |
144 | 144 |
145 // Dispatches message event to the document. | 145 // Dispatches message event to the document. |
146 void PostMessage(const base::string16& message, | 146 void PostMessage( |
147 const std::vector<int>& sent_message_port_ids); | 147 const base::string16& message, |
| 148 const std::vector<TransferredMessagePort>& sent_message_ports); |
148 | 149 |
149 // Activates the WebContents associated with | 150 // Activates the WebContents associated with |
150 // { render_process_id_, render_frame_id_ }. | 151 // { render_process_id_, render_frame_id_ }. |
151 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. | 152 // Runs the |callback| with the updated ServiceWorkerClientInfo in parameter. |
152 void Focus(const GetClientInfoCallback& callback); | 153 void Focus(const GetClientInfoCallback& callback); |
153 | 154 |
154 // Asks the renderer to send back the document information. | 155 // Asks the renderer to send back the document information. |
155 void GetClientInfo(const GetClientInfoCallback& callback) const; | 156 void GetClientInfo(const GetClientInfoCallback& callback) const; |
156 | 157 |
157 // Adds reference of this host's process to the |pattern|, the reference will | 158 // Adds reference of this host's process to the |pattern|, the reference will |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 bool is_claiming_; | 235 bool is_claiming_; |
235 | 236 |
236 std::vector<base::Closure> queued_events_; | 237 std::vector<base::Closure> queued_events_; |
237 | 238 |
238 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); | 239 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerProviderHost); |
239 }; | 240 }; |
240 | 241 |
241 } // namespace content | 242 } // namespace content |
242 | 243 |
243 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ | 244 #endif // CONTENT_BROWSER_SERVICE_WORKER_SERVICE_WORKER_PROVIDER_HOST_H_ |
OLD | NEW |