| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
| 6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 6 #define CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 // shutdown. Default is to always terminate. | 63 // shutdown. Default is to always terminate. |
| 64 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); | 64 void SetTerminateChildOnShutdown(bool terminate_on_shutdown); |
| 65 | 65 |
| 66 // Sends the given notification on the UI thread. | 66 // Sends the given notification on the UI thread. |
| 67 void Notify(int type); | 67 void Notify(int type); |
| 68 | 68 |
| 69 content::BrowserChildProcessHostDelegate* delegate() const { | 69 content::BrowserChildProcessHostDelegate* delegate() const { |
| 70 return delegate_; | 70 return delegate_; |
| 71 } | 71 } |
| 72 | 72 |
| 73 #if defined(OS_ANDROID) |
| 74 static void AppendCommonChildCommandLine(CommandLine* cmd_line); |
| 75 #endif |
| 76 |
| 73 typedef std::list<BrowserChildProcessHostImpl*> BrowserChildProcessList; | 77 typedef std::list<BrowserChildProcessHostImpl*> BrowserChildProcessList; |
| 74 private: | 78 private: |
| 75 friend class content::BrowserChildProcessHostIterator; | 79 friend class content::BrowserChildProcessHostIterator; |
| 76 | 80 |
| 77 static BrowserChildProcessList* GetIterator(); | 81 static BrowserChildProcessList* GetIterator(); |
| 78 | 82 |
| 79 // ChildProcessHostDelegate implementation: | 83 // ChildProcessHostDelegate implementation: |
| 80 virtual bool CanShutdown() OVERRIDE; | 84 virtual bool CanShutdown() OVERRIDE; |
| 81 virtual void OnChildDisconnected() OVERRIDE; | 85 virtual void OnChildDisconnected() OVERRIDE; |
| 82 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 86 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 83 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 87 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
| 84 virtual void OnChannelError() OVERRIDE; | 88 virtual void OnChannelError() OVERRIDE; |
| 85 | 89 |
| 86 // ChildProcessLauncher::Client implementation. | 90 // ChildProcessLauncher::Client implementation. |
| 87 virtual void OnProcessLaunched() OVERRIDE; | 91 virtual void OnProcessLaunched() OVERRIDE; |
| 88 | 92 |
| 89 content::ChildProcessData data_; | 93 content::ChildProcessData data_; |
| 90 content::BrowserChildProcessHostDelegate* delegate_; | 94 content::BrowserChildProcessHostDelegate* delegate_; |
| 91 scoped_ptr<content::ChildProcessHost> child_process_host_; | 95 scoped_ptr<content::ChildProcessHost> child_process_host_; |
| 92 | 96 |
| 93 scoped_ptr<ChildProcessLauncher> child_process_; | 97 scoped_ptr<ChildProcessLauncher> child_process_; |
| 94 }; | 98 }; |
| 95 | 99 |
| 96 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 100 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |