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

Side by Side Diff: content/browser/shared_worker/shared_worker_service_impl.h

Issue 1308823002: Move Singleton and related structs to namespace base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ToT Created 5 years, 3 months 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 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // IncrementWorkerRefCount and DecrementWorkerRefCount of 93 // IncrementWorkerRefCount and DecrementWorkerRefCount of
94 // RenderProcessHostImpl on UI thread if necessary. 94 // RenderProcessHostImpl on UI thread if necessary.
95 void CheckWorkerDependency(); 95 void CheckWorkerDependency();
96 96
97 void NotifyWorkerDestroyed(int worker_process_id, int worker_route_id); 97 void NotifyWorkerDestroyed(int worker_process_id, int worker_route_id);
98 98
99 private: 99 private:
100 class SharedWorkerPendingInstance; 100 class SharedWorkerPendingInstance;
101 class SharedWorkerReserver; 101 class SharedWorkerReserver;
102 102
103 friend struct DefaultSingletonTraits<SharedWorkerServiceImpl>; 103 friend struct base::DefaultSingletonTraits<SharedWorkerServiceImpl>;
104 friend class SharedWorkerServiceImplTest; 104 friend class SharedWorkerServiceImplTest;
105 105
106 typedef void (*UpdateWorkerDependencyFunc)(const std::vector<int>&, 106 typedef void (*UpdateWorkerDependencyFunc)(const std::vector<int>&,
107 const std::vector<int>&); 107 const std::vector<int>&);
108 typedef bool (*TryIncrementWorkerRefCountFunc)(bool); 108 typedef bool (*TryIncrementWorkerRefCountFunc)(bool);
109 // Pair of render_process_id and worker_route_id. 109 // Pair of render_process_id and worker_route_id.
110 typedef std::pair<int, int> ProcessRouteIdPair; 110 typedef std::pair<int, int> ProcessRouteIdPair;
111 typedef base::ScopedPtrHashMap<ProcessRouteIdPair, 111 typedef base::ScopedPtrHashMap<ProcessRouteIdPair,
112 scoped_ptr<SharedWorkerHost>> WorkerHostMap; 112 scoped_ptr<SharedWorkerHost>> WorkerHostMap;
113 typedef base::ScopedPtrHashMap<int, scoped_ptr<SharedWorkerPendingInstance>> 113 typedef base::ScopedPtrHashMap<int, scoped_ptr<SharedWorkerPendingInstance>>
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 int next_pending_instance_id_; 168 int next_pending_instance_id_;
169 169
170 base::ObserverList<WorkerServiceObserver> observers_; 170 base::ObserverList<WorkerServiceObserver> observers_;
171 171
172 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl); 172 DISALLOW_COPY_AND_ASSIGN(SharedWorkerServiceImpl);
173 }; 173 };
174 174
175 } // namespace content 175 } // namespace content
176 176
177 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_ 177 #endif // CONTENT_BROWSER_SHARED_WORKER_SHARED_WORKER_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/text_input_client_mac.mm ('k') | content/browser/shared_worker/shared_worker_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698