boliu | 61687ec5 | 2017-03-29 20:09:34 | [diff] [blame] | 1 | // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Daniel Bratell | 1e811339 | 2017-10-13 07:33:28 | [diff] [blame] | 5 | #ifndef CONTENT_BROWSER_ANDROID_LAUNCHER_THREAD_H |
| 6 | #define CONTENT_BROWSER_ANDROID_LAUNCHER_THREAD_H |
| 7 | |
boliu | 61687ec5 | 2017-03-29 20:09:34 | [diff] [blame] | 8 | #include "base/android/java_handler_thread.h" |
| 9 | |
| 10 | #include "base/lazy_instance.h" |
| 11 | |
| 12 | namespace base { |
| 13 | class MessageLoop; |
| 14 | } |
| 15 | |
| 16 | namespace content { |
| 17 | namespace android { |
| 18 | |
| 19 | // This is Android's launcher thread. This should not be used directly in |
| 20 | // native code, but accessed through BrowserThread(Impl) instead. |
| 21 | class LauncherThread { |
| 22 | public: |
| 23 | static base::MessageLoop* GetMessageLoop(); |
| 24 | |
| 25 | private: |
| 26 | friend base::LazyInstanceTraitsBase<LauncherThread>; |
| 27 | |
| 28 | LauncherThread(); |
| 29 | ~LauncherThread(); |
| 30 | |
| 31 | base::android::JavaHandlerThread java_handler_thread_; |
| 32 | }; |
| 33 | |
| 34 | } // namespace android |
| 35 | } // namespace content |
Daniel Bratell | 1e811339 | 2017-10-13 07:33:28 | [diff] [blame] | 36 | |
| 37 | #endif // CONTENT_BROWSER_ANDROID_LAUNCHER_THREAD_H |