Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: content/renderer/service_worker/embedded_worker_dispatcher.h

Issue 2496653002: Part 2 of base::IDMap refactor to eliminate IDMapOwnPointer/IDMapExternalPointer modes (Closed)
Patch Set: typedefs => using statements, update comments in base/id_map.h Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include <memory> 9 #include <memory>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 // TODO(shimazu): Remove them after all messages for EmbeddedWorker are 70 // TODO(shimazu): Remove them after all messages for EmbeddedWorker are
71 // replaced by mojo IPC. (Tracking issue: https://crbug.com/629701) 71 // replaced by mojo IPC. (Tracking issue: https://crbug.com/629701)
72 std::unique_ptr<WorkerWrapper> StartWorkerContext( 72 std::unique_ptr<WorkerWrapper> StartWorkerContext(
73 const EmbeddedWorkerStartParams& params, 73 const EmbeddedWorkerStartParams& params,
74 std::unique_ptr<ServiceWorkerContextClient> context_client); 74 std::unique_ptr<ServiceWorkerContextClient> context_client);
75 void RegisterWorker(int embedded_worker_id, 75 void RegisterWorker(int embedded_worker_id,
76 std::unique_ptr<WorkerWrapper> wrapper); 76 std::unique_ptr<WorkerWrapper> wrapper);
77 void UnregisterWorker(int embedded_worker_id); 77 void UnregisterWorker(int embedded_worker_id);
78 void RecordStopWorkerTimer(int embedded_worker_id); 78 void RecordStopWorkerTimer(int embedded_worker_id);
79 79
80 IDMap<WorkerWrapper, IDMapOwnPointer> workers_; 80 IDMap<std::unique_ptr<WorkerWrapper>> workers_;
81 std::map<int /* embedded_worker_id */, base::TimeTicks> stop_worker_times_; 81 std::map<int /* embedded_worker_id */, base::TimeTicks> stop_worker_times_;
82 base::WeakPtrFactory<EmbeddedWorkerDispatcher> weak_factory_; 82 base::WeakPtrFactory<EmbeddedWorkerDispatcher> weak_factory_;
83 83
84 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerDispatcher); 84 DISALLOW_COPY_AND_ASSIGN(EmbeddedWorkerDispatcher);
85 }; 85 };
86 86
87 } // namespace content 87 } // namespace content
88 88
89 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DISPATCHER_H_ 89 #endif // CONTENT_RENDERER_SERVICE_WORKER_EMBEDDED_WORKER_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698