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_CHILD_CHILD_THREAD_H_ | 5 #ifndef CONTENT_CHILD_CHILD_THREAD_H_ |
6 #define CONTENT_CHILD_CHILD_THREAD_H_ | 6 #define CONTENT_CHILD_CHILD_THREAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 | 133 |
134 QuotaMessageFilter* quota_message_filter() const { | 134 QuotaMessageFilter* quota_message_filter() const { |
135 return quota_message_filter_.get(); | 135 return quota_message_filter_.get(); |
136 } | 136 } |
137 | 137 |
138 base::MessageLoop* message_loop() const { return message_loop_; } | 138 base::MessageLoop* message_loop() const { return message_loop_; } |
139 | 139 |
140 // Returns the one child thread. Can only be called on the main thread. | 140 // Returns the one child thread. Can only be called on the main thread. |
141 static ChildThread* current(); | 141 static ChildThread* current(); |
142 | 142 |
143 #if defined(OS_ANDROID) | |
144 // Called on Android's service thread to shutdown the main thread of this | |
145 // process. | |
146 static void ShutdownThread(); | |
147 #endif | |
148 | |
149 protected: | 143 protected: |
150 friend class ChildProcess; | 144 friend class ChildProcess; |
151 | 145 |
152 // Called when the process refcount is 0. | 146 // Called when the process refcount is 0. |
153 void OnProcessFinalRelease(); | 147 void OnProcessFinalRelease(); |
154 | 148 |
155 virtual bool OnControlMessageReceived(const IPC::Message& msg); | 149 virtual bool OnControlMessageReceived(const IPC::Message& msg); |
156 | 150 |
157 void set_on_channel_error_called(bool on_channel_error_called) { | 151 void set_on_channel_error_called(bool on_channel_error_called) { |
158 on_channel_error_called_ = on_channel_error_called; | 152 on_channel_error_called_ = on_channel_error_called; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 scoped_ptr<base::PowerMonitor> power_monitor_; | 222 scoped_ptr<base::PowerMonitor> power_monitor_; |
229 | 223 |
230 bool in_browser_process_; | 224 bool in_browser_process_; |
231 | 225 |
232 DISALLOW_COPY_AND_ASSIGN(ChildThread); | 226 DISALLOW_COPY_AND_ASSIGN(ChildThread); |
233 }; | 227 }; |
234 | 228 |
235 } // namespace content | 229 } // namespace content |
236 | 230 |
237 #endif // CONTENT_CHILD_CHILD_THREAD_H_ | 231 #endif // CONTENT_CHILD_CHILD_THREAD_H_ |
OLD | NEW |