| 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 <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 int thread_id() const { return thread_id_; } | 137 int thread_id() const { return thread_id_; } |
| 138 int worker_devtools_agent_route_id() const; | 138 int worker_devtools_agent_route_id() const; |
| 139 MessagePortMessageFilter* message_port_message_filter() const; | 139 MessagePortMessageFilter* message_port_message_filter() const; |
| 140 | 140 |
| 141 void AddListener(Listener* listener); | 141 void AddListener(Listener* listener); |
| 142 void RemoveListener(Listener* listener); | 142 void RemoveListener(Listener* listener); |
| 143 | 143 |
| 144 void set_devtools_attached(bool attached) { devtools_attached_ = attached; } | 144 void set_devtools_attached(bool attached) { devtools_attached_ = attached; } |
| 145 bool devtools_attached() const { return devtools_attached_; } | 145 bool devtools_attached() const { return devtools_attached_; } |
| 146 | 146 |
| 147 bool network_accessed_for_script() const { |
| 148 return network_accessed_for_script_; |
| 149 } |
| 150 |
| 147 // Called when the script load request accessed the network. | 151 // Called when the script load request accessed the network. |
| 148 void OnNetworkAccessedForScriptLoad(); | 152 void OnNetworkAccessedForScriptLoad(); |
| 149 | 153 |
| 150 // Called when reading the main script from the service worker script cache | 154 // Called when reading the main script from the service worker script cache |
| 151 // begins and ends. | 155 // begins and ends. |
| 152 void OnScriptReadStarted(); | 156 void OnScriptReadStarted(); |
| 153 void OnScriptReadFinished(); | 157 void OnScriptReadFinished(); |
| 154 | 158 |
| 155 static std::string StatusToString(Status status); | 159 static std::string StatusToString(Status status); |
| 156 static std::string StartingPhaseToString(StartingPhase phase); | 160 static std::string StartingPhaseToString(StartingPhase phase); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 base::TimeTicks start_timing_; | 281 base::TimeTicks start_timing_; |
| 278 | 282 |
| 279 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; | 283 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; |
| 280 | 284 |
| 281 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); | 285 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); |
| 282 }; | 286 }; |
| 283 | 287 |
| 284 } // namespace content | 288 } // namespace content |
| 285 | 289 |
| 286 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 290 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
| OLD | NEW |