| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 void OnChannelError() override; | 94 void OnChannelError() override; |
| 95 void OnBadMessageReceived(const IPC::Message& message) override; | 95 void OnBadMessageReceived(const IPC::Message& message) override; |
| 96 | 96 |
| 97 // Terminates the process and logs a stack trace after a bad message was | 97 // Terminates the process and logs a stack trace after a bad message was |
| 98 // received from the child process. | 98 // received from the child process. |
| 99 void TerminateOnBadMessageReceived(const std::string& error); | 99 void TerminateOnBadMessageReceived(const std::string& error); |
| 100 | 100 |
| 101 // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown | 101 // Removes this host from the host list. Calls ChildProcessHost::ForceShutdown |
| 102 void ForceShutdown(); | 102 void ForceShutdown(); |
| 103 | 103 |
| 104 // Callers can reduce the BrowserChildProcess' priority. | |
| 105 void SetBackgrounded(bool backgrounded); | |
| 106 | |
| 107 // Adds an IPC message filter. | 104 // Adds an IPC message filter. |
| 108 void AddFilter(BrowserMessageFilter* filter); | 105 void AddFilter(BrowserMessageFilter* filter); |
| 109 | 106 |
| 110 static void HistogramBadMessageTerminated(int process_type); | 107 static void HistogramBadMessageTerminated(int process_type); |
| 111 | 108 |
| 112 BrowserChildProcessHostDelegate* delegate() const { return delegate_; } | 109 BrowserChildProcessHostDelegate* delegate() const { return delegate_; } |
| 113 | 110 |
| 114 ChildConnection* child_connection() const { | 111 ChildConnection* child_connection() const { |
| 115 return child_connection_.get(); | 112 return child_connection_.get(); |
| 116 } | 113 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 IPC::Channel* channel_ = nullptr; | 172 IPC::Channel* channel_ = nullptr; |
| 176 bool is_channel_connected_; | 173 bool is_channel_connected_; |
| 177 bool notify_child_disconnected_; | 174 bool notify_child_disconnected_; |
| 178 | 175 |
| 179 base::WeakPtrFactory<BrowserChildProcessHostImpl> weak_factory_; | 176 base::WeakPtrFactory<BrowserChildProcessHostImpl> weak_factory_; |
| 180 }; | 177 }; |
| 181 | 178 |
| 182 } // namespace content | 179 } // namespace content |
| 183 | 180 |
| 184 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ | 181 #endif // CONTENT_BROWSER_BROWSER_CHILD_PROCESS_HOST_IMPL_H_ |
| OLD | NEW |