OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WORKER_DEVTOOLS_MANAGER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_MANAGER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_MANAGER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
14 #include "content/browser/worker_host/worker_process_host.h" | 14 #include "content/browser/worker_host/worker_process_host.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 | 16 |
17 namespace content { | 17 namespace content { |
18 | 18 |
19 class DevToolsAgentHost; | 19 class DevToolsAgentHost; |
20 | 20 |
21 // All methods are supposed to be called on the IO thread. | 21 // All methods are supposed to be called on the IO thread. |
| 22 // This class is not used when "enable-embedded-shared-worker" flag is set. |
22 class WorkerDevToolsManager { | 23 class WorkerDevToolsManager { |
23 public: | 24 public: |
24 typedef std::pair<int, int> WorkerId; | 25 typedef std::pair<int, int> WorkerId; |
25 class WorkerDevToolsAgentHost; | 26 class WorkerDevToolsAgentHost; |
26 | 27 |
27 // Returns the WorkerDevToolsManager singleton. | 28 // Returns the WorkerDevToolsManager singleton. |
28 static WorkerDevToolsManager* GetInstance(); | 29 static WorkerDevToolsManager* GetInstance(); |
29 | 30 |
30 // Called on the UI thread. | 31 // Called on the UI thread. |
31 static DevToolsAgentHost* GetDevToolsAgentHostForWorker( | 32 static DevToolsAgentHost* GetDevToolsAgentHostForWorker( |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // worker. | 106 // worker. |
106 // - Existing DevTools client was reattached to the new worker. | 107 // - Existing DevTools client was reattached to the new worker. |
107 PausedWorkers paused_workers_; | 108 PausedWorkers paused_workers_; |
108 | 109 |
109 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsManager); | 110 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsManager); |
110 }; | 111 }; |
111 | 112 |
112 } // namespace content | 113 } // namespace content |
113 | 114 |
114 #endif // CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_MANAGER_H_ | 115 #endif // CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_MANAGER_H_ |
OLD | NEW |