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

Side by Side Diff: content/browser/devtools/service_worker_devtools_manager.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_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 89
90 void AddObserver(Observer* observer); 90 void AddObserver(Observer* observer);
91 void RemoveObserver(Observer* observer); 91 void RemoveObserver(Observer* observer);
92 92
93 void set_debug_service_worker_on_start(bool debug_on_start); 93 void set_debug_service_worker_on_start(bool debug_on_start);
94 bool debug_service_worker_on_start() const { 94 bool debug_service_worker_on_start() const {
95 return debug_service_worker_on_start_; 95 return debug_service_worker_on_start_;
96 } 96 }
97 97
98 private: 98 private:
99 friend struct DefaultSingletonTraits<ServiceWorkerDevToolsManager>; 99 friend struct base::DefaultSingletonTraits<ServiceWorkerDevToolsManager>;
100 friend class ServiceWorkerDevToolsAgentHost; 100 friend class ServiceWorkerDevToolsAgentHost;
101 101
102 using AgentHostMap = std::map<WorkerId, ServiceWorkerDevToolsAgentHost*>; 102 using AgentHostMap = std::map<WorkerId, ServiceWorkerDevToolsAgentHost*>;
103 103
104 ServiceWorkerDevToolsManager(); 104 ServiceWorkerDevToolsManager();
105 ~ServiceWorkerDevToolsManager(); 105 ~ServiceWorkerDevToolsManager();
106 106
107 AgentHostMap::iterator FindExistingWorkerAgentHost( 107 AgentHostMap::iterator FindExistingWorkerAgentHost(
108 const ServiceWorkerIdentifier& service_worker_id); 108 const ServiceWorkerIdentifier& service_worker_id);
109 109
110 // Resets to its initial state as if newly created. 110 // Resets to its initial state as if newly created.
111 void ResetForTesting(); 111 void ResetForTesting();
112 112
113 base::ObserverList<Observer> observer_list_; 113 base::ObserverList<Observer> observer_list_;
114 AgentHostMap workers_; 114 AgentHostMap workers_;
115 bool debug_service_worker_on_start_; 115 bool debug_service_worker_on_start_;
116 116
117 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDevToolsManager); 117 DISALLOW_COPY_AND_ASSIGN(ServiceWorkerDevToolsManager);
118 }; 118 };
119 119
120 } // namespace content 120 } // namespace content
121 121
122 #endif // CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_ 122 #endif // CONTENT_BROWSER_DEVTOOLS_SERVICE_WORKER_DEVTOOLS_MANAGER_H_
OLDNEW
« no previous file with comments | « content/browser/devtools/devtools_manager.cc ('k') | content/browser/devtools/service_worker_devtools_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698