| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 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.content_shell_apk; | 5 package org.chromium.content_shell_apk; |
| 6 | 6 |
| 7 import android.app.Service; | 7 import android.app.Service; |
| 8 import android.content.Intent; | 8 import android.content.Intent; |
| 9 import android.os.Handler; | 9 import android.os.Handler; |
| 10 import android.os.HandlerThread; | 10 import android.os.HandlerThread; |
| 11 import android.os.IBinder; | 11 import android.os.IBinder; |
| 12 import android.os.Message; | 12 import android.os.Message; |
| 13 import android.os.Messenger; | 13 import android.os.Messenger; |
| 14 import android.os.RemoteException; | 14 import android.os.RemoteException; |
| 15 | 15 |
| 16 import org.chromium.base.BaseSwitches; | 16 import org.chromium.base.BaseSwitches; |
| 17 import org.chromium.base.CommandLine; | 17 import org.chromium.base.CommandLine; |
| 18 import org.chromium.base.library_loader.LibraryLoader; | 18 import org.chromium.base.library_loader.LibraryLoader; |
| 19 import org.chromium.base.library_loader.LibraryProcessType; | 19 import org.chromium.base.library_loader.LibraryProcessType; |
| 20 import org.chromium.base.library_loader.ProcessInitException; | 20 import org.chromium.base.library_loader.ProcessInitException; |
| 21 import org.chromium.base.process_launcher.BaseChildProcessConnection; |
| 21 import org.chromium.base.process_launcher.ChildProcessCreationParams; | 22 import org.chromium.base.process_launcher.ChildProcessCreationParams; |
| 22 import org.chromium.base.process_launcher.FileDescriptorInfo; | 23 import org.chromium.base.process_launcher.FileDescriptorInfo; |
| 23 import org.chromium.content.browser.BaseChildProcessConnection; | |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * A Service that assists the ChildProcessLauncherTest that responds to one mess
age, which | 26 * A Service that assists the ChildProcessLauncherTest that responds to one mess
age, which |
| 27 * starts a sandboxed service process via the ChildProcessLauncher. This is requ
ired to test | 27 * starts a sandboxed service process via the ChildProcessLauncher. This is requ
ired to test |
| 28 * the behavior when two independent processes in the same package try and bind
to the same | 28 * the behavior when two independent processes in the same package try and bind
to the same |
| 29 * sandboxed service process. | 29 * sandboxed service process. |
| 30 */ | 30 */ |
| 31 public class ChildProcessLauncherTestHelperService extends Service { | 31 public class ChildProcessLauncherTestHelperService extends Service { |
| 32 public static final int MSG_BIND_SERVICE = IBinder.FIRST_CALL_TRANSACTION +
1; | 32 public static final int MSG_BIND_SERVICE = IBinder.FIRST_CALL_TRANSACTION +
1; |
| 33 public static final int MSG_BIND_SERVICE_REPLY = MSG_BIND_SERVICE + 1; | 33 public static final int MSG_BIND_SERVICE_REPLY = MSG_BIND_SERVICE + 1; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 throw new RuntimeException(ex); | 92 throw new RuntimeException(ex); |
| 93 } | 93 } |
| 94 } else { | 94 } else { |
| 95 handler.postDelayed(this, 10 /* milliseconds */); | 95 handler.postDelayed(this, 10 /* milliseconds */); |
| 96 } | 96 } |
| 97 } | 97 } |
| 98 }; | 98 }; |
| 99 handler.postDelayed(task, 10); | 99 handler.postDelayed(task, 10); |
| 100 } | 100 } |
| 101 } | 101 } |
| OLD | NEW |