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 <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 int thread_id() const { return thread_id_; } | 133 int thread_id() const { return thread_id_; } |
134 int worker_devtools_agent_route_id() const; | 134 int worker_devtools_agent_route_id() const; |
135 MessagePortMessageFilter* message_port_message_filter() const; | 135 MessagePortMessageFilter* message_port_message_filter() const; |
136 | 136 |
137 void AddListener(Listener* listener); | 137 void AddListener(Listener* listener); |
138 void RemoveListener(Listener* listener); | 138 void RemoveListener(Listener* listener); |
139 | 139 |
140 void set_devtools_attached(bool attached) { devtools_attached_ = attached; } | 140 void set_devtools_attached(bool attached) { devtools_attached_ = attached; } |
141 bool devtools_attached() const { return devtools_attached_; } | 141 bool devtools_attached() const { return devtools_attached_; } |
142 | 142 |
| 143 bool network_accessed_for_script() const { |
| 144 return network_accessed_for_script_; |
| 145 } |
| 146 |
143 // Called when the script load request accessed the network. | 147 // Called when the script load request accessed the network. |
144 void OnNetworkAccessedForScriptLoad(); | 148 void OnNetworkAccessedForScriptLoad(); |
145 | 149 |
146 static std::string StatusToString(Status status); | 150 static std::string StatusToString(Status status); |
147 static std::string StartingPhaseToString(StartingPhase phase); | 151 static std::string StartingPhaseToString(StartingPhase phase); |
148 | 152 |
149 private: | 153 private: |
150 typedef base::ObserverList<Listener> ListenerList; | 154 typedef base::ObserverList<Listener> ListenerList; |
151 class DevToolsProxy; | 155 class DevToolsProxy; |
152 friend class EmbeddedWorkerRegistry; | 156 friend class EmbeddedWorkerRegistry; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 base::TimeTicks start_timing_; | 262 base::TimeTicks start_timing_; |
259 | 263 |
260 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; | 264 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; |
261 | 265 |
262 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); | 266 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); |
263 }; | 267 }; |
264 | 268 |
265 } // namespace content | 269 } // namespace content |
266 | 270 |
267 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 271 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
OLD | NEW |