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