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_EMBEDDED_WORKER_INSTANCE_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
224 int column_number, | 224 int column_number, |
225 const GURL& source_url); | 225 const GURL& source_url); |
226 | 226 |
227 // Called back from Registry when the worker instance reports to the console. | 227 // Called back from Registry when the worker instance reports to the console. |
228 void OnReportConsoleMessage(int source_identifier, | 228 void OnReportConsoleMessage(int source_identifier, |
229 int message_level, | 229 int message_level, |
230 const base::string16& message, | 230 const base::string16& message, |
231 int line_number, | 231 int line_number, |
232 const GURL& source_url); | 232 const GURL& source_url); |
233 | 233 |
234 // Resets all running state. After this function is called, |status_| is | |
235 // STOPPED. | |
234 void ReleaseProcess(); | 236 void ReleaseProcess(); |
237 // Called when the startup sequence failed. Calls ReleaseProcess() and invokes | |
238 // |callback| with |status|. May destroy |this|. | |
kinuko
2015/09/13 08:41:11
nit: ... via |callback|. ?
| |
239 void OnStartFailed(const StatusCallback& callback, | |
240 ServiceWorkerStatusCode status); | |
235 | 241 |
236 base::WeakPtr<ServiceWorkerContextCore> context_; | 242 base::WeakPtr<ServiceWorkerContextCore> context_; |
237 scoped_refptr<EmbeddedWorkerRegistry> registry_; | 243 scoped_refptr<EmbeddedWorkerRegistry> registry_; |
238 const int embedded_worker_id_; | 244 const int embedded_worker_id_; |
239 Status status_; | 245 Status status_; |
240 StartingPhase starting_phase_; | 246 StartingPhase starting_phase_; |
241 | 247 |
242 // Current running information. -1 indicates the worker is not running. | 248 // Current running information. -1 indicates the worker is not running. |
243 int process_id_; | 249 int process_id_; |
244 int thread_id_; | 250 int thread_id_; |
(...skipping 13 matching lines...) Expand all Loading... | |
258 base::TimeTicks start_timing_; | 264 base::TimeTicks start_timing_; |
259 | 265 |
260 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; | 266 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; |
261 | 267 |
262 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); | 268 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); |
263 }; | 269 }; |
264 | 270 |
265 } // namespace content | 271 } // namespace content |
266 | 272 |
267 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 273 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
OLD | NEW |