OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 package org.chromium.mojo.shell; | 5 package org.chromium.mojo.shell; |
6 | 6 |
7 import android.os.HandlerThread; | 7 import android.os.HandlerThread; |
8 | 8 |
9 import org.chromium.base.JNINamespace; | 9 import org.chromium.base.annotations.JNINamespace; |
10 | 10 |
11 /** | 11 /** |
12 * Handler thread associated with a native message loop. | 12 * Handler thread associated with a native message loop. |
13 */ | 13 */ |
14 @JNINamespace("shell") | 14 @JNINamespace("shell") |
15 public class NativeHandlerThread extends HandlerThread { | 15 public class NativeHandlerThread extends HandlerThread { |
16 // The native message loop. | 16 // The native message loop. |
17 private long mNativeMessageLoop = 0; | 17 private long mNativeMessageLoop = 0; |
18 | 18 |
19 /** | 19 /** |
(...skipping 25 matching lines...) Expand all Loading... |
45 if (mNativeMessageLoop == 0) { | 45 if (mNativeMessageLoop == 0) { |
46 mNativeMessageLoop = nativeCreateMessageLoop(); | 46 mNativeMessageLoop = nativeCreateMessageLoop(); |
47 } | 47 } |
48 super.onLooperPrepared(); | 48 super.onLooperPrepared(); |
49 } | 49 } |
50 | 50 |
51 native long nativeCreateMessageLoop(); | 51 native long nativeCreateMessageLoop(); |
52 | 52 |
53 native void nativeDeleteMessageLoop(long messageLoop); | 53 native void nativeDeleteMessageLoop(long messageLoop); |
54 } | 54 } |
OLD | NEW |