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_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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 175 QuotaMessageFilter* quota_message_filter() const { | 175 QuotaMessageFilter* quota_message_filter() const { |
| 176 return quota_message_filter_.get(); | 176 return quota_message_filter_.get(); |
| 177 } | 177 } |
| 178 | 178 |
| 179 ChildResourceMessageFilter* child_resource_message_filter() const { | 179 ChildResourceMessageFilter* child_resource_message_filter() const { |
| 180 return resource_message_filter_.get(); | 180 return resource_message_filter_.get(); |
| 181 } | 181 } |
| 182 | 182 |
| 183 base::MessageLoop* message_loop() const { return message_loop_; } | 183 base::MessageLoop* message_loop() const { return message_loop_; } |
| 184 | 184 |
| 185 base::SingleThreadTaskRunner* main_task_runner() const { | |
|
kinuko
2016/08/09 14:12:18
main_thread_->main_task_runner() looks slightly cr
| |
| 186 return main_task_runner_.get(); | |
| 187 } | |
| 188 | |
| 185 // Returns the one child thread. Can only be called on the main thread. | 189 // Returns the one child thread. Can only be called on the main thread. |
| 186 static ChildThreadImpl* current(); | 190 static ChildThreadImpl* current(); |
| 187 | 191 |
| 188 #if defined(OS_ANDROID) | 192 #if defined(OS_ANDROID) |
| 189 // Called on Android's service thread to shutdown the main thread of this | 193 // Called on Android's service thread to shutdown the main thread of this |
| 190 // process. | 194 // process. |
| 191 static void ShutdownThread(); | 195 static void ShutdownThread(); |
| 192 #endif | 196 #endif |
| 193 | 197 |
| 194 protected: | 198 protected: |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 265 | 269 |
| 266 // Handles resource loads for this process. | 270 // Handles resource loads for this process. |
| 267 std::unique_ptr<ResourceDispatcher> resource_dispatcher_; | 271 std::unique_ptr<ResourceDispatcher> resource_dispatcher_; |
| 268 | 272 |
| 269 // The OnChannelError() callback was invoked - the channel is dead, don't | 273 // The OnChannelError() callback was invoked - the channel is dead, don't |
| 270 // attempt to communicate. | 274 // attempt to communicate. |
| 271 bool on_channel_error_called_; | 275 bool on_channel_error_called_; |
| 272 | 276 |
| 273 base::MessageLoop* message_loop_; | 277 base::MessageLoop* message_loop_; |
| 274 | 278 |
| 279 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner_; | |
| 280 | |
| 275 std::unique_ptr<FileSystemDispatcher> file_system_dispatcher_; | 281 std::unique_ptr<FileSystemDispatcher> file_system_dispatcher_; |
| 276 | 282 |
| 277 std::unique_ptr<QuotaDispatcher> quota_dispatcher_; | 283 std::unique_ptr<QuotaDispatcher> quota_dispatcher_; |
| 278 | 284 |
| 279 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; | 285 scoped_refptr<ChildHistogramMessageFilter> histogram_message_filter_; |
| 280 | 286 |
| 281 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; | 287 scoped_refptr<ChildResourceMessageFilter> resource_message_filter_; |
| 282 | 288 |
| 283 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; | 289 scoped_refptr<ServiceWorkerMessageFilter> service_worker_message_filter_; |
| 284 | 290 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 341 | 347 |
| 342 private: | 348 private: |
| 343 struct Options options_; | 349 struct Options options_; |
| 344 | 350 |
| 345 DISALLOW_COPY_AND_ASSIGN(Builder); | 351 DISALLOW_COPY_AND_ASSIGN(Builder); |
| 346 }; | 352 }; |
| 347 | 353 |
| 348 } // namespace content | 354 } // namespace content |
| 349 | 355 |
| 350 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ | 356 #endif // CONTENT_CHILD_CHILD_THREAD_IMPL_H_ |
| OLD | NEW |