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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/LauncherThread.java

Issue 2774363003: android: Java-based launcher thread (Closed)
Patch Set: gab review 2 Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
5 package org.chromium.content.browser;
6
7 import android.os.Handler;
8
9 import org.chromium.base.JavaHandlerThread;
10 import org.chromium.base.annotations.CalledByNative;
11 import org.chromium.base.annotations.JNINamespace;
12
13 @JNINamespace("content::android")
14 final class LauncherThread {
15 private static final JavaHandlerThread sThread =
16 new JavaHandlerThread("Chrome_ProcessLauncherThread");
17 private static final Handler sHandler;
18 static {
19 sThread.maybeStart();
20 sHandler = new Handler(sThread.getLooper());
21 }
22
23 static void post(Runnable r) {
24 sHandler.post(r);
25 }
26
27 @CalledByNative
28 private static JavaHandlerThread getHandlerThread() {
29 return sThread;
30 }
31
32 private LauncherThread() {}
33 }
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698