OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.browser; | 5 package org.chromium.content.browser; |
6 | 6 |
7 import android.content.ComponentName; | 7 import android.content.ComponentName; |
8 import android.content.Context; | 8 import android.content.Context; |
9 import android.content.Intent; | 9 import android.content.Intent; |
10 import android.content.ServiceConnection; | 10 import android.content.ServiceConnection; |
11 import android.os.AsyncTask; | 11 import android.os.AsyncTask; |
12 import android.os.Bundle; | 12 import android.os.Bundle; |
13 import android.os.Handler; | 13 import android.os.Handler; |
14 import android.os.IBinder; | 14 import android.os.IBinder; |
15 import android.os.Looper; | 15 import android.os.Looper; |
16 import android.os.ParcelFileDescriptor; | 16 import android.os.ParcelFileDescriptor; |
17 import android.util.Log; | 17 import android.util.Log; |
18 | 18 |
19 import java.util.concurrent.atomic.AtomicBoolean; | 19 import java.util.concurrent.atomic.AtomicBoolean; |
20 | 20 |
21 import org.chromium.base.CalledByNative; | 21 import org.chromium.base.CalledByNative; |
22 import org.chromium.content.app.SandboxedProcessService; | 22 import org.chromium.content.app.SandboxedProcessService; |
23 import org.chromium.content.browser.CommandLine; | 23 import org.chromium.content.common.CommandLine; |
24 import org.chromium.content.common.ISandboxedProcessCallback; | 24 import org.chromium.content.common.ISandboxedProcessCallback; |
25 import org.chromium.content.common.ISandboxedProcessService; | 25 import org.chromium.content.common.ISandboxedProcessService; |
26 // TODO(michaelbai): Move to org.chromium.content.commnon. | 26 import org.chromium.content.common.TraceEvent; |
27 import org.chromium.content.browser.TraceEvent; | |
28 | 27 |
29 public class SandboxedProcessConnection { | 28 public class SandboxedProcessConnection { |
30 interface DeathCallback { | 29 interface DeathCallback { |
31 void onSandboxedProcessDied(int pid); | 30 void onSandboxedProcessDied(int pid); |
32 } | 31 } |
33 | 32 |
34 // Names of items placed in the bind intent or connection bundle. | 33 // Names of items placed in the bind intent or connection bundle. |
35 public static final String EXTRA_COMMAND_LINE = | 34 public static final String EXTRA_COMMAND_LINE = |
36 "com.google.android.apps.chrome.extra.sandbox_command_line"; | 35 "com.google.android.apps.chrome.extra.sandbox_command_line"; |
37 // Note the FD may only be passed in the connection bundle. | 36 // Note the FD may only be passed in the connection bundle. |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 } | 403 } |
405 } | 404 } |
406 | 405 |
407 /** | 406 /** |
408 * @return The connection PID, or 0 if not yet connected. | 407 * @return The connection PID, or 0 if not yet connected. |
409 */ | 408 */ |
410 synchronized public int getPid() { | 409 synchronized public int getPid() { |
411 return mPID; | 410 return mPID; |
412 } | 411 } |
413 } | 412 } |
OLD | NEW |