Chromium Code Reviews| Index: remoting/host/win/worker_process_launcher.h |
| diff --git a/remoting/host/win/worker_process_launcher.h b/remoting/host/win/worker_process_launcher.h |
| index 1eea8cd0775d844daea07da9ba2b0c60cfd2be28..327c9f17db381912c5a4e4805f9bf52251975170 100644 |
| --- a/remoting/host/win/worker_process_launcher.h |
| +++ b/remoting/host/win/worker_process_launcher.h |
| @@ -14,6 +14,7 @@ |
| namespace base { |
| class SingleThreadTaskRunner; |
| +class TimeDelta; |
| } // namespace base |
| namespace IPC { |
| @@ -21,6 +22,10 @@ class Listener; |
| class Message; |
| } // namespace IPC |
| +namespace tracked_objects { |
| +class Location; |
| +} // namespace tracked_objects |
| + |
| namespace remoting { |
| class WorkerProcessIpcDelegate; |
| @@ -35,6 +40,9 @@ class WorkerProcessLauncher { |
| public: |
| virtual ~Delegate(); |
| + // Closes the IPC channel. |
| + virtual void CloseChannel() = 0; |
| + |
| // Returns PID of the worker process or 0 if it is not available. |
| virtual DWORD GetProcessId() const = 0; |
| @@ -68,12 +76,24 @@ class WorkerProcessLauncher { |
| WorkerProcessIpcDelegate* worker_delegate); |
| ~WorkerProcessLauncher(); |
| + // Asks the worker process to crash and generate a dump, and closes the IPC |
| + // channel. |location| is passed to the worker so that it is on the stack in |
| + // the dump. Restarts the worker process forcefully, if it does |
| + // not exit on its own. |
| + void Crash(const tracked_objects::Location& location); |
| + |
| // Sends an IPC message to the worker process. The message will be silently |
| // dropped if Send() is called before Start() or after stutdown has been |
| // initiated. |
| void Send(IPC::Message* message); |
| private: |
| + friend class WorkerProcessLauncherTest; |
| + |
| + // Hooks that allow test code to call the corresponding methods of |Core|. |
|
Wez
2013/03/08 01:45:15
nit: Since these are test specific the convention
alexeypa (please no reviews)
2013/03/08 17:43:20
Done.
|
| + void OnLaunchSuccessTimeout(); |
| + void SetKillProcessTimeout(const base::TimeDelta& timeout); |
| + |
| // The actual implementation resides in WorkerProcessLauncher::Core class. |
| class Core; |
| scoped_refptr<Core> core_; |