| 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_IMPL_H_ | 5 #ifndef CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
| 6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 6 #define CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 ChildResourceMessageFilter* child_resource_message_filter() const { | 185 ChildResourceMessageFilter* child_resource_message_filter() const { |
| 186 return resource_message_filter_.get(); | 186 return resource_message_filter_.get(); |
| 187 } | 187 } |
| 188 | 188 |
| 189 WebSocketMessageFilter* websocket_message_filter() const { | 189 WebSocketMessageFilter* websocket_message_filter() const { |
| 190 return websocket_message_filter_.get(); | 190 return websocket_message_filter_.get(); |
| 191 } | 191 } |
| 192 | 192 |
| 193 base::MessageLoop* message_loop() const { return message_loop_; } | 193 base::MessageLoop* message_loop() const { return message_loop_; } |
| 194 | 194 |
| 195 base::SingleThreadTaskRunner* main_task_runner() const { |
| 196 return main_task_runner_.get(); |
| 197 } |
| 198 |
| 195 // Returns the one child thread. Can only be called on the main thread. | 199 // Returns the one child thread. Can only be called on the main thread. |
| 196 static ChildThreadImpl* current(); | 200 static ChildThreadImpl* current(); |
| 197 | 201 |
| 198 #if defined(OS_ANDROID) | 202 #if defined(OS_ANDROID) |
| 199 // Called on Android's service thread to shutdown the main thread of this | 203 // Called on Android's service thread to shutdown the main thread of this |
| 200 // process. | 204 // process. |
| 201 static void ShutdownThread(); | 205 static void ShutdownThread(); |
| 202 #endif | 206 #endif |
| 203 | 207 |
| 204 protected: | 208 protected: |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 std::unique_ptr<ResourceDispatcher> resource_dispatcher_; | 281 std::unique_ptr<ResourceDispatcher> resource_dispatcher_; |
| 278 | 282 |
| 279 std::unique_ptr<WebSocketDispatcher> websocket_dispatcher_; | 283 std::unique_ptr<WebSocketDispatcher> websocket_dispatcher_; |
| 280 | 284 |
| 281 // The OnChannelError() callback was invoked - the channel is dead, don't | 285 // The OnChannelError() callback was invoked - the channel is dead, don't |
| 282 // attempt to communicate. | 286 // attempt to communicate. |
| 283 bool on_channel_error_called_; | 287 bool on_channel_error_called_; |
| 284 | 288 |
| 285 base::MessageLoop* message_loop_; | 289 base::MessageLoop* message_loop_; |
| 286 | 290 |
| 291 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; |
| 292 |
| 287 std::unique_ptr<FileSystemDispatcher> file_system_dispatcher_; | 293 std::unique_ptr<FileSystemDispatcher> file_system_dispatcher_; |
| 288 | 294 |
| 289 std::unique_ptr<QuotaDispatcher> quota_dispatcher_; | 295 std::unique_ptr<QuotaDispatcher> quota_dispatcher_; |
| 290 | 296 |
| 291 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; | 297 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; |
| 292 | 298 |
| 293 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; | 299 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; |
| 294 | 300 |
| 295 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; | 301 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; |
| 296 | 302 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 | 361 |
| 356 private: | 362 private: |
| 357 struct Options options_; | 363 struct Options options_; |
| 358 | 364 |
| 359 DISALLOW_COPY_AND_ASSIGN(Builder); | 365 DISALLOW_COPY_AND_ASSIGN(Builder); |
| 360 }; | 366 }; |
| 361 | 367 |
| 362 } // namespace content | 368 } // namespace content |
| 363 | 369 |
| 364 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 370 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
| OLD | NEW |