Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / content / browser / android / java / java_bridge_thread.h
blob662f031b8ae5fb3ee501149f893249e489341b23
1 // Copyright 2015 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.
5 #ifndef CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_JAVA_BRIDGE_THREAD_H_
6 #define CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_JAVA_BRIDGE_THREAD_H_
8 #include "base/android/java_handler_thread.h"
10 namespace base {
11 class TaskRunner;
14 namespace content {
16 // The JavaBridge needs to use a Java thread so the callback
17 // will happen on a thread with a prepared Looper.
18 class JavaBridgeThread : public base::android::JavaHandlerThread {
19 public:
20 JavaBridgeThread();
21 ~JavaBridgeThread() override;
23 static bool CurrentlyOn();
24 static base::TaskRunner* GetTaskRunner();
27 } // namespace content
29 #endif // CONTENT_BROWSER_ANDROID_JAVA_GIN_JAVA_JAVA_BRIDGE_THREAD_H_