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_IO_H_ |
| 6 #define CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_IO_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 DevToolsClientHost; |
| 17 class WorkerDevToolsMessageFilter; |
| 18 |
| 19 // All methods are supposed to be called on the IO thread. |
| 20 class WorkerDevToolsManagerIO { |
| 21 public: |
| 22 // Returns the WorkerDevToolsManagerIO singleton. |
| 23 static WorkerDevToolsManagerIO* GetInstance(); |
| 24 |
| 25 // This method is called on the UI thread by the devtools handler. |
| 26 static bool ForwardToWorkerDevToolsAgentOnUIThread( |
| 27 DevToolsClientHost* from, |
| 28 const IPC::Message& message); |
| 29 |
| 30 void OpenDevToolsForWorker(int worker_process_id, int worker_route_id); |
| 31 void WorkerDevToolsClientClosing(int worker_process_host_id, |
| 32 int worker_route_id); |
| 33 |
| 34 void ForwardToDevToolsClient(int worker_process_id, |
| 35 int worker_route_id, |
| 36 const IPC::Message& message); |
| 37 void WorkerProcessDestroying(int worker_process_host_id); |
| 38 |
| 39 private: |
| 40 friend struct DefaultSingletonTraits<WorkerDevToolsManagerIO>; |
| 41 |
| 42 WorkerDevToolsManagerIO(); |
| 43 ~WorkerDevToolsManagerIO(); |
| 44 static void ForwardToWorkerDevToolsAgentOnIOThread( |
| 45 int worker_process_host_id, |
| 46 int worker_route_id, |
| 47 const IPC::Message& message); |
| 48 void ForwardToWorkerDevToolsAgent(int worker_process_host_id, |
| 49 int worker_route_id, |
| 50 const IPC::Message& message); |
| 51 class InspectedWorkersList; |
| 52 scoped_ptr<InspectedWorkersList> inspected_workers_; |
| 53 |
| 54 DISALLOW_COPY_AND_ASSIGN(WorkerDevToolsManagerIO); |
| 55 }; |
| 56 |
| 57 #endif // CONTENT_BROWSER_DEBUGGER_WORKER_DEVTOOLS_MANAGER_IO_H_ |
OLD | NEW |