Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Unified Diff: content/browser/android/launcher_thread.cc

Issue 2774363003: android: Java-based launcher thread (Closed)
Patch Set: gab review 2 Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/android/launcher_thread.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/launcher_thread.cc
diff --git a/content/browser/android/launcher_thread.cc b/content/browser/android/launcher_thread.cc
new file mode 100644
index 0000000000000000000000000000000000000000..2c59a2da7a5756000a98be34c925e8f93eb88a32
--- /dev/null
+++ b/content/browser/android/launcher_thread.cc
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/android/launcher_thread.h"
+
+#include "jni/LauncherThread_jni.h"
+
+namespace content {
+namespace android {
+
+namespace {
+base::LazyInstance<LauncherThread>::Leaky g_launcher_thread;
+}
+
+base::MessageLoop* LauncherThread::GetMessageLoop() {
+ return g_launcher_thread.Get().java_handler_thread_.message_loop();
+}
+
+LauncherThread::LauncherThread()
+ : java_handler_thread_(Java_LauncherThread_getHandlerThread(
+ base::android::AttachCurrentThread())) {}
+
+LauncherThread::~LauncherThread() {}
+
+} // namespace android
+} // namespace content
« no previous file with comments | « content/browser/android/launcher_thread.h ('k') | content/browser/browser_main_loop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698