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 void set_network_accessed_for_script(bool network_accessed) { | |
nhiroki
2015/08/24 07:57:51
nit: Can you remove this? In general, it'd be pref
jungkees
2015/08/25 09:36:51
Absolutely. I'll remove it.
| |
144 network_accessed_for_script_ = network_accessed; | |
145 } | |
146 bool network_accessed_for_script() const { | |
147 return network_accessed_for_script_; | |
148 } | |
149 | |
143 // Called when the script load request accessed the network. | 150 // Called when the script load request accessed the network. |
144 void OnNetworkAccessedForScriptLoad(); | 151 void OnNetworkAccessedForScriptLoad(); |
145 | 152 |
146 static std::string StatusToString(Status status); | 153 static std::string StatusToString(Status status); |
147 static std::string StartingPhaseToString(StartingPhase phase); | 154 static std::string StartingPhaseToString(StartingPhase phase); |
148 | 155 |
149 private: | 156 private: |
150 typedef base::ObserverList<Listener> ListenerList; | 157 typedef base::ObserverList<Listener> ListenerList; |
151 class DevToolsProxy; | 158 class DevToolsProxy; |
152 friend class EmbeddedWorkerRegistry; | 159 friend class EmbeddedWorkerRegistry; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
258 base::TimeTicks start_timing_; | 265 base::TimeTicks start_timing_; |
259 | 266 |
260 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; | 267 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; |
261 | 268 |
262 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); | 269 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); |
263 }; | 270 }; |
264 | 271 |
265 } // namespace content | 272 } // namespace content |
266 | 273 |
267 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 274 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
OLD | NEW |