| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 IOS_WEB_WEB_THREAD_IMPL_H_ | 5 #ifndef IOS_WEB_WEB_THREAD_IMPL_H_ |
| 6 #define IOS_WEB_WEB_THREAD_IMPL_H_ | 6 #define IOS_WEB_WEB_THREAD_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
| 10 #include "ios/web/public/web_thread.h" | 10 #include "ios/web/public/web_thread.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 // the thread id from the callstack alone in crash dumps. | 42 // the thread id from the callstack alone in crash dumps. |
| 43 void UIThreadRun(base::RunLoop* run_loop); | 43 void UIThreadRun(base::RunLoop* run_loop); |
| 44 void DBThreadRun(base::RunLoop* run_loop); | 44 void DBThreadRun(base::RunLoop* run_loop); |
| 45 void FileThreadRun(base::RunLoop* run_loop); | 45 void FileThreadRun(base::RunLoop* run_loop); |
| 46 void FileUserBlockingThreadRun(base::RunLoop* run_loop); | 46 void FileUserBlockingThreadRun(base::RunLoop* run_loop); |
| 47 void CacheThreadRun(base::RunLoop* run_loop); | 47 void CacheThreadRun(base::RunLoop* run_loop); |
| 48 void IOThreadRun(base::RunLoop* run_loop); | 48 void IOThreadRun(base::RunLoop* run_loop); |
| 49 | 49 |
| 50 static bool PostTaskHelper(WebThread::ID identifier, | 50 static bool PostTaskHelper(WebThread::ID identifier, |
| 51 const tracked_objects::Location& from_here, | 51 const tracked_objects::Location& from_here, |
| 52 base::Closure task, | 52 base::OnceClosure task, |
| 53 base::TimeDelta delay, | 53 base::TimeDelta delay, |
| 54 bool nestable); | 54 bool nestable); |
| 55 | 55 |
| 56 // Common initialization code for the constructors. | 56 // Common initialization code for the constructors. |
| 57 void Initialize(); | 57 void Initialize(); |
| 58 | 58 |
| 59 // Performs cleanup that needs to happen on the IO thread before calling the | 59 // Performs cleanup that needs to happen on the IO thread before calling the |
| 60 // embedder's CleanUp function. | 60 // embedder's CleanUp function. |
| 61 void IOThreadPreCleanUp(); | 61 void IOThreadPreCleanUp(); |
| 62 | 62 |
| 63 // For testing. | 63 // For testing. |
| 64 friend class TestWebThreadBundle; | 64 friend class TestWebThreadBundle; |
| 65 friend class TestWebThreadBundleImpl; | 65 friend class TestWebThreadBundleImpl; |
| 66 friend class WebTestSuiteListener; | 66 friend class WebTestSuiteListener; |
| 67 static void FlushThreadPoolHelperForTesting(); | 67 static void FlushThreadPoolHelperForTesting(); |
| 68 | 68 |
| 69 // The identifier of this thread. Only one thread can exist with a given | 69 // The identifier of this thread. Only one thread can exist with a given |
| 70 // identifier at a given time. | 70 // identifier at a given time. |
| 71 ID identifier_; | 71 ID identifier_; |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 } // namespace web | 74 } // namespace web |
| 75 | 75 |
| 76 #endif // IOS_WEB_WEB_THREAD_IMPL_H_ | 76 #endif // IOS_WEB_WEB_THREAD_IMPL_H_ |
| OLD | NEW |