| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 void SendStartWorker(scoped_ptr<EmbeddedWorkerMsg_StartWorker_Params> params, | 140 void SendStartWorker(scoped_ptr<EmbeddedWorkerMsg_StartWorker_Params> params, |
| 141 const StatusCallback& callback, | 141 const StatusCallback& callback, |
| 142 int worker_devtools_agent_route_id, | 142 int worker_devtools_agent_route_id, |
| 143 bool wait_for_debugger); | 143 bool wait_for_debugger); |
| 144 | 144 |
| 145 // Called back from Registry when the worker instance has ack'ed that | 145 // Called back from Registry when the worker instance has ack'ed that |
| 146 // it is ready for inspection. | 146 // it is ready for inspection. |
| 147 void OnReadyForInspection(); | 147 void OnReadyForInspection(); |
| 148 | 148 |
| 149 // Called back from Registry when the worker instance has ack'ed that | 149 // Called back from Registry when the worker instance has ack'ed that |
| 150 // it finished loading the script. | 150 // it finished loading the script and has started a worker thread. |
| 151 void OnScriptLoaded(); | 151 void OnScriptLoaded(int thread_id); |
| 152 | 152 |
| 153 // Called back from Registry when the worker instance has ack'ed that | 153 // Called back from Registry when the worker instance has ack'ed that |
| 154 // it failed to load the script. | 154 // it failed to load the script. |
| 155 void OnScriptLoadFailed(); | 155 void OnScriptLoadFailed(); |
| 156 | 156 |
| 157 // Called back from Registry when the worker instance has ack'ed that | 157 // Called back from Registry when the worker instance has ack'ed that |
| 158 // its WorkerGlobalScope is actually started and parsed on |thread_id| in the | 158 // its WorkerGlobalScope is actually started and parsed. |
| 159 // child process. | |
| 160 // This will change the internal status from STARTING to RUNNING. | 159 // This will change the internal status from STARTING to RUNNING. |
| 161 void OnStarted(int thread_id); | 160 void OnStarted(); |
| 162 | 161 |
| 163 void OnPausedAfterDownload(); | 162 void OnPausedAfterDownload(); |
| 164 | 163 |
| 165 // Called back from Registry when the worker instance has ack'ed that | 164 // Called back from Registry when the worker instance has ack'ed that |
| 166 // its WorkerGlobalScope is actually stopped in the child process. | 165 // its WorkerGlobalScope is actually stopped in the child process. |
| 167 // This will change the internal status from STARTING or RUNNING to | 166 // This will change the internal status from STARTING or RUNNING to |
| 168 // STOPPED. | 167 // STOPPED. |
| 169 void OnStopped(); | 168 void OnStopped(); |
| 170 | 169 |
| 171 // Called back from Registry when the worker instance sends message | 170 // Called back from Registry when the worker instance sends message |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 ListenerList listener_list_; | 204 ListenerList listener_list_; |
| 206 | 205 |
| 207 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; | 206 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; |
| 208 | 207 |
| 209 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); | 208 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); |
| 210 }; | 209 }; |
| 211 | 210 |
| 212 } // namespace content | 211 } // namespace content |
| 213 | 212 |
| 214 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 213 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
| OLD | NEW |