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