| Index: content/browser/service_worker/embedded_worker_instance.h
|
| diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h
|
| index 24717f8eb17cf74eaa246323ba54d9189204bab3..6d2b9565ed5b6abd329ffe22cd225ab8a1b28829 100644
|
| --- a/content/browser/service_worker/embedded_worker_instance.h
|
| +++ b/content/browser/service_worker/embedded_worker_instance.h
|
| @@ -53,6 +53,17 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
|
| STOPPING,
|
| };
|
|
|
| + enum StartingPhase {
|
| + NOT_STARTING,
|
| + ALLOCATE_PROCESS,
|
| + REGISTER_TO_DEVTOOLS,
|
| + SEND_START_WORKER,
|
| + SCRIPT_DOWNLOAD,
|
| + SCRIPT_LOADED,
|
| + SCRIPT_EVALUATED,
|
| + STARTING_PHASE_MAX_VALUE,
|
| + };
|
| +
|
| class Listener {
|
| public:
|
| virtual ~Listener() {}
|
| @@ -106,6 +117,10 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
|
|
|
| int embedded_worker_id() const { return embedded_worker_id_; }
|
| Status status() const { return status_; }
|
| + StartingPhase starting_phase() const {
|
| + DCHECK_EQ(STARTING, status());
|
| + return starting_phase_;
|
| + }
|
| int process_id() const { return process_id_; }
|
| int thread_id() const { return thread_id_; }
|
| int worker_devtools_agent_route_id() const;
|
| @@ -115,10 +130,14 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
|
| void RemoveListener(Listener* listener);
|
|
|
| void set_devtools_attached(bool attached) { devtools_attached_ = attached; }
|
| + bool devtools_attached() const { return devtools_attached_; }
|
|
|
| // Called when the script load request accessed the network.
|
| void OnNetworkAccessedForScriptLoad();
|
|
|
| + static std::string StatusToString(Status status);
|
| + static std::string StartingPhaseToString(StartingPhase phase);
|
| +
|
| private:
|
| typedef ObserverList<Listener> ListenerList;
|
| class DevToolsProxy;
|
| @@ -202,6 +221,7 @@ class CONTENT_EXPORT EmbeddedWorkerInstance {
|
| scoped_refptr<EmbeddedWorkerRegistry> registry_;
|
| const int embedded_worker_id_;
|
| Status status_;
|
| + StartingPhase starting_phase_;
|
|
|
| // Current running information. -1 indicates the worker is not running.
|
| int process_id_;
|
|
|