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_REGISTRY_H_ | 5 #ifndef CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ |
6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ | 6 #define CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 const GURL& script_url, | 57 const GURL& script_url, |
58 const StatusCallback& callback); | 58 const StatusCallback& callback); |
59 ServiceWorkerStatusCode StopWorker(int process_id, | 59 ServiceWorkerStatusCode StopWorker(int process_id, |
60 int embedded_worker_id); | 60 int embedded_worker_id); |
61 | 61 |
62 // Stop all active workers, even if they're handling events. | 62 // Stop all active workers, even if they're handling events. |
63 void Shutdown(); | 63 void Shutdown(); |
64 | 64 |
65 // Called back from EmbeddedWorker in the child process, relayed via | 65 // Called back from EmbeddedWorker in the child process, relayed via |
66 // ServiceWorkerDispatcherHost. | 66 // ServiceWorkerDispatcherHost. |
| 67 void OnWorkerScriptLoaded(int process_id, int embedded_worker_id); |
| 68 void OnWorkerScriptLoadFailed(int process_id, int embedded_worker_id); |
67 void OnWorkerStarted(int process_id, int thread_id, int embedded_worker_id); | 69 void OnWorkerStarted(int process_id, int thread_id, int embedded_worker_id); |
68 void OnWorkerStopped(int process_id, int embedded_worker_id); | 70 void OnWorkerStopped(int process_id, int embedded_worker_id); |
69 void OnReportException(int embedded_worker_id, | 71 void OnReportException(int embedded_worker_id, |
70 const base::string16& error_message, | 72 const base::string16& error_message, |
71 int line_number, | 73 int line_number, |
72 int column_number, | 74 int column_number, |
73 const GURL& source_url); | 75 const GURL& source_url); |
74 void OnReportConsoleMessage(int embedded_worker_id, | 76 void OnReportConsoleMessage(int embedded_worker_id, |
75 int source_identifier, | 77 int source_identifier, |
76 int message_level, | 78 int message_level, |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 std::map<int, std::set<int> > worker_process_map_; | 119 std::map<int, std::set<int> > worker_process_map_; |
118 | 120 |
119 int next_embedded_worker_id_; | 121 int next_embedded_worker_id_; |
120 | 122 |
121 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerRegistry); | 123 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerRegistry); |
122 }; | 124 }; |
123 | 125 |
124 } // namespace content | 126 } // namespace content |
125 | 127 |
126 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ | 128 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ |
OLD | NEW |