Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef EXTENSIONS_BROWSER_SERVICE_WORKER_DATA_H_ | |
| 6 #define EXTENSIONS_BROWSER_SERVICE_WORKER_DATA_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "extensions/renderer/service_worker_request_sender.h" | |
| 11 #include "extensions/renderer/v8_schema_registry.h" | |
| 12 | |
| 13 namespace extensions { | |
| 14 class WorkerThreadDispatcher; | |
| 15 | |
| 16 // Per ServiceWorker data in worker thread. | |
| 17 // Contains: RequestSender, V8SchemaRegistry. | |
| 18 // TODO(lazyboy): Move WorkerScriptContextSet functionality to this class. | |
|
Devlin
2016/04/13 19:46:32
WorkerScriptContextSet?
lazyboy
2016/04/14 02:07:53
WorkerScriptContextSet manages SW ScriptContexts i
| |
| 19 class ServiceWorkerData { | |
| 20 public: | |
| 21 ServiceWorkerData(WorkerThreadDispatcher* dispatcher, int embedded_worker_id); | |
| 22 ~ServiceWorkerData(); | |
|
Devlin
2016/04/13 19:46:32
\n
lazyboy
2016/04/14 02:07:53
Done.
| |
| 23 V8SchemaRegistry* v8_schema_registry() { return v8_schema_registry_.get(); } | |
| 24 RequestSender* request_sender() { return request_sender_.get(); } | |
| 25 int embedded_worker_id() const { return embedded_worker_id_; } | |
| 26 | |
| 27 private: | |
| 28 const int embedded_worker_id_; | |
| 29 | |
| 30 scoped_ptr<V8SchemaRegistry> v8_schema_registry_; | |
|
Devlin
2016/04/13 19:46:32
unique_ptr
lazyboy
2016/04/14 02:07:54
Done.
| |
| 31 scoped_ptr<ServiceWorkerRequestSender> request_sender_; | |
| 32 | |
| 33 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerData); | |
| 34 }; | |
| 35 | |
| 36 } // namespace extensions | |
| 37 | |
| 38 #endif // EXTENSIONS_BROWSER_SERVICE_WORKER_DATA_H_ | |
| OLD | NEW |