| 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); |
| 67 void OnWorkerStarted(int process_id, int thread_id, int embedded_worker_id); | 68 void OnWorkerStarted(int process_id, int thread_id, int embedded_worker_id); |
| 68 void OnWorkerStopped(int process_id, int embedded_worker_id); | 69 void OnWorkerStopped(int process_id, int embedded_worker_id); |
| 69 void OnReportException(int embedded_worker_id, | 70 void OnReportException(int embedded_worker_id, |
| 70 const base::string16& error_message, | 71 const base::string16& error_message, |
| 71 int line_number, | 72 int line_number, |
| 72 int column_number, | 73 int column_number, |
| 73 const GURL& source_url); | 74 const GURL& source_url); |
| 74 void OnReportConsoleMessage(int embedded_worker_id, | 75 void OnReportConsoleMessage(int embedded_worker_id, |
| 75 int source_identifier, | 76 int source_identifier, |
| 76 int message_level, | 77 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_; | 118 std::map<int, std::set<int> > worker_process_map_; |
| 118 | 119 |
| 119 int next_embedded_worker_id_; | 120 int next_embedded_worker_id_; |
| 120 | 121 |
| 121 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerRegistry); | 122 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerRegistry); |
| 122 }; | 123 }; |
| 123 | 124 |
| 124 } // namespace content | 125 } // namespace content |
| 125 | 126 |
| 126 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ | 127 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_REGISTRY_H_ |
| OLD | NEW |