OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DEBUGGER_WORKER_DEVTOOLS_MANAGER_IO_H_ | 5 #ifndef CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_IO_H_ |
6 #define CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_IO_H_ | 6 #define CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_IO_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
| 12 #include "content/common/content_export.h" |
12 | 13 |
13 namespace IPC { | 14 namespace IPC { |
14 class Message; | 15 class Message; |
15 } | 16 } |
16 class DevToolsClientHost; | 17 class DevToolsClientHost; |
17 class WorkerDevToolsMessageFilter; | 18 class WorkerDevToolsMessageFilter; |
18 | 19 |
19 // All methods are supposed to be called on the IO thread. | 20 // All methods are supposed to be called on the IO thread. |
20 class WorkerDevToolsManagerIO { | 21 class WorkerDevToolsManagerIO { |
21 public: | 22 public: |
22 // Returns the WorkerDevToolsManagerIO singleton. | 23 // Returns the WorkerDevToolsManagerIO singleton. |
23 static WorkerDevToolsManagerIO* GetInstance(); | 24 static WorkerDevToolsManagerIO* GetInstance(); |
24 | 25 |
25 // This method is called on the UI thread by the devtools handler. | 26 // This method is called on the UI thread by the devtools handler. |
26 static bool ForwardToWorkerDevToolsAgentOnUIThread( | 27 CONTENT_EXPORT static bool ForwardToWorkerDevToolsAgentOnUIThread( |
27 DevToolsClientHost* from, | 28 DevToolsClientHost* from, |
28 const IPC::Message& message); | 29 const IPC::Message& message); |
29 | 30 |
30 static bool HasDevToolsClient(int worker_process_id, int worker_route_id); | 31 CONTENT_EXPORT static bool HasDevToolsClient( |
31 static void RegisterDevToolsClientForWorkerOnUIThread( | 32 int worker_process_id, |
| 33 int worker_route_id); |
| 34 |
| 35 CONTENT_EXPORT static void RegisterDevToolsClientForWorkerOnUIThread( |
32 DevToolsClientHost* client, | 36 DevToolsClientHost* client, |
33 int worker_process_id, | 37 int worker_process_id, |
34 int worker_route_id); | 38 int worker_route_id); |
35 | 39 |
36 void WorkerDevToolsClientClosing(int worker_process_host_id, | 40 void WorkerDevToolsClientClosing(int worker_process_host_id, |
37 int worker_route_id); | 41 int worker_route_id); |
38 | 42 |
39 void ForwardToDevToolsClient(int worker_process_id, | 43 void ForwardToDevToolsClient(int worker_process_id, |
40 int worker_route_id, | 44 int worker_route_id, |
41 const IPC::Message& message); | 45 const IPC::Message& message); |
(...skipping 15 matching lines...) Expand all Loading... |
57 void ForwardToWorkerDevToolsAgent(int worker_process_host_id, | 61 void ForwardToWorkerDevToolsAgent(int worker_process_host_id, |
58 int worker_route_id, | 62 int worker_route_id, |
59 const IPC::Message& message); | 63 const IPC::Message& message); |
60 class InspectedWorkersList; | 64 class InspectedWorkersList; |
61 scoped_ptr<InspectedWorkersList> inspected_workers_; | 65 scoped_ptr<InspectedWorkersList> inspected_workers_; |
62 | 66 |
63 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsManagerIO); | 67 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsManagerIO); |
64 }; | 68 }; |
65 | 69 |
66 #endif // CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_IO_H_ | 70 #endif // CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_IO_H_ |
OLD | NEW |