OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_H_ |
| 6 #define CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "base/basictypes.h" |
| 10 #include "base/memory/singleton.h" |
| 11 #include "base/scoped_ptr.h" |
| 12 |
| 13 namespace IPC { |
| 14 class Message; |
| 15 } |
| 16 class WorkerDevToolsMessageFilter; |
| 17 |
| 18 // All methods are supposed to be called on the IO thread. |
| 19 class WorkerDevToolsManager { |
| 20 public: |
| 21 // Returns the WorkerDevToolsManager singleton. |
| 22 static WorkerDevToolsManager* GetInstance(); |
| 23 |
| 24 void OpenDevToolsForWorker(int worker_process_id, int worker_route_id); |
| 25 void WorkerDevToolsClientClosing(int worker_devtools_id); |
| 26 |
| 27 void ForwardToDevToolsClient(int worker_process_id, |
| 28 int worker_route_id, |
| 29 const IPC::Message& message); |
| 30 void ForwardToWorkerDevToolsAgent(int worker_devtools_id, |
| 31 const IPC::Message& message); |
| 32 void WorkerProcessDestroying(int worker_process_host_id); |
| 33 |
| 34 private: |
| 35 friend struct DefaultSingletonTraits<WorkerDevToolsManager>; |
| 36 |
| 37 WorkerDevToolsManager(); |
| 38 ~WorkerDevToolsManager(); |
| 39 |
| 40 class DevToolsWorkerIds; |
| 41 scoped_ptr<DevToolsWorkerIds> devtools_worker_ids_; |
| 42 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsManager); |
| 43 }; |
| 44 |
| 45 #endif // CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_H_ |
OLD | NEW |