OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ |
6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ | 6 #define CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 // IncrementWorkerRefCount and DecrementWorkerRefCount of | 94 // IncrementWorkerRefCount and DecrementWorkerRefCount of |
95 // RenderProcessHostImpl on UI thread if necessary. | 95 // RenderProcessHostImpl on UI thread if necessary. |
96 void CheckWorkerDependency(); | 96 void CheckWorkerDependency(); |
97 | 97 |
98 void NotifyWorkerDestroyed(int worker_process_id, int worker_route_id); | 98 void NotifyWorkerDestroyed(int worker_process_id, int worker_route_id); |
99 | 99 |
100 private: | 100 private: |
101 class SharedWorkerPendingInstance; | 101 class SharedWorkerPendingInstance; |
102 class SharedWorkerReserver; | 102 class SharedWorkerReserver; |
103 | 103 |
104 friend struct DefaultSingletonTraits<SharedWorkerServiceImpl>; | 104 friend struct base::DefaultSingletonTraits<SharedWorkerServiceImpl>; |
105 friend class SharedWorkerServiceImplTest; | 105 friend class SharedWorkerServiceImplTest; |
106 | 106 |
107 typedef void (*UpdateWorkerDependencyFunc)(const std::vector<int>&, | 107 typedef void (*UpdateWorkerDependencyFunc)(const std::vector<int>&, |
108 const std::vector<int>&); | 108 const std::vector<int>&); |
109 typedef bool (*TryIncrementWorkerRefCountFunc)(bool); | 109 typedef bool (*TryIncrementWorkerRefCountFunc)(bool); |
110 // Pair of render_process_id and worker_route_id. | 110 // Pair of render_process_id and worker_route_id. |
111 typedef std::pair<int, int> ProcessRouteIdPair; | 111 typedef std::pair<int, int> ProcessRouteIdPair; |
112 typedef base::ScopedPtrHashMap<ProcessRouteIdPair, | 112 typedef base::ScopedPtrHashMap<ProcessRouteIdPair, |
113 scoped_ptr<SharedWorkerHost>> WorkerHostMap; | 113 scoped_ptr<SharedWorkerHost>> WorkerHostMap; |
114 typedef base::ScopedPtrHashMap<int, scoped_ptr<SharedWorkerPendingInstance>> | 114 typedef base::ScopedPtrHashMap<int, scoped_ptr<SharedWorkerPendingInstance>> |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 int next_pending_instance_id_; | 169 int next_pending_instance_id_; |
170 | 170 |
171 base::ObserverList<WorkerServiceObserver> observers_; | 171 base::ObserverList<WorkerServiceObserver> observers_; |
172 | 172 |
173 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl); | 173 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl); |
174 }; | 174 }; |
175 | 175 |
176 } // namespace content | 176 } // namespace content |
177 | 177 |
178 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ | 178 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ |
OLD | NEW |