Chromium Code Reviews| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 85 // ChildProcessHostDelegate implementation: | 85 // ChildProcessHostDelegate implementation: |
| 86 bool CanShutdown() override; | 86 bool CanShutdown() override; |
| 87 void OnChildDisconnected() override; | 87 void OnChildDisconnected() override; |
| 88 const base::Process& GetProcess() const override; | 88 const base::Process& GetProcess() const override; |
| 89 service_manager::InterfaceProvider* GetRemoteInterfaces() override; | 89 service_manager::InterfaceProvider* GetRemoteInterfaces() override; |
| 90 bool OnMessageReceived(const IPC::Message& message) override; | 90 bool OnMessageReceived(const IPC::Message& message) override; |
| 91 void OnChannelConnected(int32_t peer_pid) override; | 91 void OnChannelConnected(int32_t peer_pid) override; |
| 92 void OnChannelError() override; | 92 void OnChannelError() override; |
| 93 void OnBadMessageReceived(const IPC::Message& message) override; | 93 void OnBadMessageReceived(const IPC::Message& message) override; |
| 94 | 94 |
| 95 // Terminates the process and logs an error after a bad message was received | 95 // Terminates the process and logs an stack trace after a bad message was |
|
Charlie Reis
2017/01/10 23:06:43
nit: s/an/a/
sadrul
2017/01/11 02:29:13
Done.
| |
| 96 // from the child process. | 96 // received from the child process. |
| 97 void TerminateOnBadMessageReceived(uint32_t type); | 97 void TerminateOnBadMessageReceived(const std::string& error); |
| 98 | 98 |
| 99 // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown | 99 // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown |
| 100 void ForceShutdown(); | 100 void ForceShutdown(); |
| 101 | 101 |
| 102 // Callers can reduce the BrowserChildProcess' priority. | 102 // Callers can reduce the BrowserChildProcess' priority. |
| 103 void SetBackgrounded(bool backgrounded); | 103 void SetBackgrounded(bool backgrounded); |
| 104 | 104 |
| 105 // Adds an IPC message filter. | 105 // Adds an IPC message filter. |
| 106 void AddFilter(BrowserMessageFilter* filter); | 106 void AddFilter(BrowserMessageFilter* filter); |
| 107 | 107 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 | 170 |
| 171 bool is_channel_connected_; | 171 bool is_channel_connected_; |
| 172 bool notify_child_disconnected_; | 172 bool notify_child_disconnected_; |
| 173 | 173 |
| 174 base::WeakPtrFactory<BrowserChildProcessHostImpl> weak_factory_; | 174 base::WeakPtrFactory<BrowserChildProcessHostImpl> weak_factory_; |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 } // namespace content | 177 } // namespace content |
| 178 | 178 |
| 179 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 179 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |