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/worker_devtools_manager.h

Issue 223583002: Revert of Make DevTools support for the embedded SharedWorker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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 (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.
23 class WorkerDevToolsManager { 22 class WorkerDevToolsManager {
24 public: 23 public:
25 typedef std::pair<int, int> WorkerId; 24 typedef std::pair<int, int> WorkerId;
26 class WorkerDevToolsAgentHost; 25 class WorkerDevToolsAgentHost;
27 26
28 // Returns the WorkerDevToolsManager singleton. 27 // Returns the WorkerDevToolsManager singleton.
29 static WorkerDevToolsManager* GetInstance(); 28 static WorkerDevToolsManager* GetInstance();
30 29
31 // Called on the UI thread. 30 // Called on the UI thread.
32 static DevToolsAgentHost* GetDevToolsAgentHostForWorker( 31 static DevToolsAgentHost* GetDevToolsAgentHostForWorker(
33 int worker_process_id, 32 int worker_process_id,
34 int worker_route_id); 33 int worker_route_id);
35 34
36 void ForwardToDevToolsClient(int worker_process_id, 35 void ForwardToDevToolsClient(int worker_process_id,
37 int worker_route_id, 36 int worker_route_id,
38 const std::string& message); 37 const std::string& message);
39 void SaveAgentRuntimeState(int worker_process_id, 38 void SaveAgentRuntimeState(int worker_process_id,
40 int worker_route_id, 39 int worker_route_id,
41 const std::string& state); 40 const std::string& state);
42 41
43 // Called on the IO thread. 42 // Called on the IO thread.
44 // Returns true when the worker must be paused on start. 43 // Returns true when the worker must be paused on start.
45 bool WorkerCreated(WorkerProcessHost* process, 44 bool WorkerCreated(
46 const WorkerProcessHost::WorkerInstance& instance); 45 WorkerProcessHost* process,
46 const WorkerProcessHost::WorkerInstance& instance);
47 void WorkerDestroyed(WorkerProcessHost* process, int worker_route_id); 47 void WorkerDestroyed(WorkerProcessHost* process, int worker_route_id);
48 void WorkerContextStarted(WorkerProcessHost* process, int worker_route_id); 48 void WorkerContextStarted(WorkerProcessHost* process, int worker_route_id);
49 49
50 private: 50 private:
51 friend struct DefaultSingletonTraits<WorkerDevToolsManager>; 51 friend struct DefaultSingletonTraits<WorkerDevToolsManager>;
52 class DetachedClientHosts; 52 class DetachedClientHosts;
53 struct InspectedWorker; 53 struct InspectedWorker;
54 typedef std::list<InspectedWorker> InspectedWorkersList; 54 typedef std::list<InspectedWorker> InspectedWorkersList;
55 55
56 WorkerDevToolsManager(); 56 WorkerDevToolsManager();
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // worker. 101 // worker.
102 // - Existing DevTools client was reattached to the new worker. 102 // - Existing DevTools client was reattached to the new worker.
103 PausedWorkers paused_workers_; 103 PausedWorkers paused_workers_;
104 104
105 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsManager); 105 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsManager);
106 }; 106 };
107 107
108 } // namespace content 108 } // namespace content
109 109
110 #endif // CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_MANAGER_H_ 110 #endif // CONTENT_BROWSER_DEVTOOLS_WORKER_DEVTOOLS_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698