| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 CHROME_COMMON_CHILD_PROCESS_HOST_H_ | 5 #ifndef CHROME_COMMON_CHILD_PROCESS_HOST_H_ |
| 6 #define CHROME_COMMON_CHILD_PROCESS_HOST_H_ | 6 #define CHROME_COMMON_CHILD_PROCESS_HOST_H_ |
| 7 | 7 |
| 8 #if defined(OS_WIN) | |
| 9 #include <windows.h> | |
| 10 #endif // defined(OS_WIN) | |
| 11 | |
| 12 #include <list> | 8 #include <list> |
| 13 #include <string> | 9 #include <string> |
| 14 | 10 |
| 15 // Must be included early (e.g. before chrome/common/plugin_messages.h) | 11 // Must be included early (e.g. before chrome/common/plugin_messages.h) |
| 16 #include "ipc/ipc_logging.h" | 12 #include "ipc/ipc_logging.h" |
| 17 | 13 |
| 14 // Putting this before ipc_logging.h does not work (OS_WIN isn't defined) |
| 15 #if defined(OS_WIN) |
| 16 #include <windows.h> |
| 17 #endif // defined(OS_WIN) |
| 18 |
| 18 #include "base/basictypes.h" | 19 #include "base/basictypes.h" |
| 19 #include "base/file_path.h" | 20 #include "base/file_path.h" |
| 20 #include "base/scoped_ptr.h" | 21 #include "base/scoped_ptr.h" |
| 21 #include "chrome/common/notification_type.h" | 22 #include "chrome/common/notification_type.h" |
| 22 #include "ipc/ipc_channel.h" | 23 #include "ipc/ipc_channel.h" |
| 23 | 24 |
| 25 |
| 24 class CommandLine; | 26 class CommandLine; |
| 25 | 27 |
| 26 // Provides common functionality for hosting a child process and processing IPC | 28 // Provides common functionality for hosting a child process and processing IPC |
| 27 // messages between the host and the child process. Subclasses are responsible | 29 // messages between the host and the child process. Subclasses are responsible |
| 28 // for the actual launching and terminating of the child processes. | 30 // for the actual launching and terminating of the child processes. |
| 29 // | 31 // |
| 30 class ChildProcessHost : public IPC::Channel::Listener { | 32 class ChildProcessHost : public IPC::Channel::Listener { |
| 31 public: | 33 public: |
| 32 virtual ~ChildProcessHost(); | 34 virtual ~ChildProcessHost(); |
| 33 | 35 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 | 114 |
| 113 ListenerHook listener_; | 115 ListenerHook listener_; |
| 114 | 116 |
| 115 bool opening_channel_; // True while we're waiting the channel to be opened. | 117 bool opening_channel_; // True while we're waiting the channel to be opened. |
| 116 scoped_ptr<IPC::Channel> channel_; | 118 scoped_ptr<IPC::Channel> channel_; |
| 117 std::string channel_id_; | 119 std::string channel_id_; |
| 118 }; | 120 }; |
| 119 | 121 |
| 120 #endif // CHROME_COMMON_CHILD_PROCESS_HOST_H_ | 122 #endif // CHROME_COMMON_CHILD_PROCESS_HOST_H_ |
| 121 | 123 |
| OLD | NEW |