| 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_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DISPATCHER_H_ | 5 #ifndef CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DISPATCHER_H_ |
| 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DISPATCHER_H_ | 6 #define CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/id_map.h" | 10 #include "base/id_map.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // IPC::Listener overrides. | 27 // IPC::Listener overrides. |
| 28 bool OnMessageReceived(const IPC::Message& message) override; | 28 bool OnMessageReceived(const IPC::Message& message) override; |
| 29 | 29 |
| 30 void WorkerContextDestroyed(int embedded_worker_id); | 30 void WorkerContextDestroyed(int embedded_worker_id); |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 class WorkerWrapper; | 33 class WorkerWrapper; |
| 34 | 34 |
| 35 void OnStartWorker(const EmbeddedWorkerMsg_StartWorker_Params& params); | 35 void OnStartWorker(const EmbeddedWorkerMsg_StartWorker_Params& params); |
| 36 void OnStopWorker(int embedded_worker_id); | 36 void OnStopWorker(int embedded_worker_id); |
| 37 void OnResumeAfterDownload(int embedded_worker_id); | |
| 38 | 37 |
| 39 IDMap<WorkerWrapper, IDMapOwnPointer> workers_; | 38 IDMap<WorkerWrapper, IDMapOwnPointer> workers_; |
| 40 std::map<int /* embedded_worker_id */, base::TimeTicks> stop_worker_times_; | 39 std::map<int /* embedded_worker_id */, base::TimeTicks> stop_worker_times_; |
| 41 base::WeakPtrFactory<EmbeddedWorkerDispatcher> weak_factory_; | 40 base::WeakPtrFactory<EmbeddedWorkerDispatcher> weak_factory_; |
| 42 | 41 |
| 43 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerDispatcher); | 42 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerDispatcher); |
| 44 }; | 43 }; |
| 45 | 44 |
| 46 } // namespace content | 45 } // namespace content |
| 47 | 46 |
| 48 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DISPATCHER_H_ | 47 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DISPATCHER_H_ |
| OLD | NEW |