| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) | 143 #if defined(OS_ANDROID) |
| 144 // Called on Android's service thread to shutdown the main thread of this | 144 // Called on Android's service thread to shutdown the main thread of this |
| 145 // process. | 145 // process. |
| 146 static void ShutdownThread(); | 146 static void ShutdownThread(); |
| 147 #endif | 147 #endif |
| 148 | 148 |
| 149 static void SetJavaScriptFlags(const std::string& flags); |
| 150 |
| 149 protected: | 151 protected: |
| 150 friend class ChildProcess; | 152 friend class ChildProcess; |
| 151 | 153 |
| 152 // Called when the process refcount is 0. | 154 // Called when the process refcount is 0. |
| 153 void OnProcessFinalRelease(); | 155 void OnProcessFinalRelease(); |
| 154 | 156 |
| 155 virtual bool OnControlMessageReceived(const IPC::Message& msg); | 157 virtual bool OnControlMessageReceived(const IPC::Message& msg); |
| 156 | 158 |
| 157 void set_on_channel_error_called(bool on_channel_error_called) { | 159 void set_on_channel_error_called(bool on_channel_error_called) { |
| 158 on_channel_error_called_ = on_channel_error_called; | 160 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_; | 230 scoped_ptr<base::PowerMonitor> power_monitor_; |
| 229 | 231 |
| 230 bool in_browser_process_; | 232 bool in_browser_process_; |
| 231 | 233 |
| 232 DISALLOW_COPY_AND_ASSIGN(ChildThread); | 234 DISALLOW_COPY_AND_ASSIGN(ChildThread); |
| 233 }; | 235 }; |
| 234 | 236 |
| 235 } // namespace content | 237 } // namespace content |
| 236 | 238 |
| 237 #endif // CONTENT_CHILD_CHILD_THREAD_H_ | 239 #endif // CONTENT_CHILD_CHILD_THREAD_H_ |
| OLD | NEW |