| 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 <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 void set_devtools_attached(bool attached) { devtools_attached_ = attached; } | 136 void set_devtools_attached(bool attached) { devtools_attached_ = attached; } |
| 137 bool devtools_attached() const { return devtools_attached_; } | 137 bool devtools_attached() const { return devtools_attached_; } |
| 138 | 138 |
| 139 // Called when the script load request accessed the network. | 139 // Called when the script load request accessed the network. |
| 140 void OnNetworkAccessedForScriptLoad(); | 140 void OnNetworkAccessedForScriptLoad(); |
| 141 | 141 |
| 142 static std::string StatusToString(Status status); | 142 static std::string StatusToString(Status status); |
| 143 static std::string StartingPhaseToString(StartingPhase phase); | 143 static std::string StartingPhaseToString(StartingPhase phase); |
| 144 | 144 |
| 145 private: | 145 private: |
| 146 typedef ObserverList<Listener> ListenerList; | 146 typedef base::ObserverList<Listener> ListenerList; |
| 147 class DevToolsProxy; | 147 class DevToolsProxy; |
| 148 friend class EmbeddedWorkerRegistry; | 148 friend class EmbeddedWorkerRegistry; |
| 149 FRIEND_TEST_ALL_PREFIXES(EmbeddedWorkerInstanceTest, StartAndStop); | 149 FRIEND_TEST_ALL_PREFIXES(EmbeddedWorkerInstanceTest, StartAndStop); |
| 150 | 150 |
| 151 // Constructor is called via EmbeddedWorkerRegistry::CreateWorker(). | 151 // Constructor is called via EmbeddedWorkerRegistry::CreateWorker(). |
| 152 // This instance holds a ref of |registry|. | 152 // This instance holds a ref of |registry|. |
| 153 EmbeddedWorkerInstance(base::WeakPtr<ServiceWorkerContextCore> context, | 153 EmbeddedWorkerInstance(base::WeakPtr<ServiceWorkerContextCore> context, |
| 154 int embedded_worker_id); | 154 int embedded_worker_id); |
| 155 | 155 |
| 156 // Called back from ServiceWorkerProcessManager after Start() passes control | 156 // Called back from ServiceWorkerProcessManager after Start() passes control |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 base::TimeTicks start_timing_; | 248 base::TimeTicks start_timing_; |
| 249 | 249 |
| 250 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; | 250 base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_; |
| 251 | 251 |
| 252 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); | 252 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerInstance); |
| 253 }; | 253 }; |
| 254 | 254 |
| 255 } // namespace content | 255 } // namespace content |
| 256 | 256 |
| 257 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ | 257 #endif // CONTENT_BROWSER_SERVICE_WORKER_EMBEDDED_WORKER_INSTANCE_H_ |
| OLD | NEW |