| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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; |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 public int getServiceNumber() { | 264 public int getServiceNumber() { |
| 265 return mServiceNumber; | 265 return mServiceNumber; |
| 266 } | 266 } |
| 267 | 267 |
| 268 @Override | 268 @Override |
| 269 public boolean isInSandbox() { | 269 public boolean isInSandbox() { |
| 270 return mInSandbox; | 270 return mInSandbox; |
| 271 } | 271 } |
| 272 | 272 |
| 273 @Override | 273 @Override |
| 274 public String getPackageName() { |
| 275 return mCreationParams != null ? mCreationParams.getPackageName() |
| 276 : mContext.getPackageName(); |
| 277 } |
| 278 |
| 279 @Override |
| 274 public IChildProcessService getService() { | 280 public IChildProcessService getService() { |
| 275 synchronized (mLock) { | 281 synchronized (mLock) { |
| 276 return mService; | 282 return mService; |
| 277 } | 283 } |
| 278 } | 284 } |
| 279 | 285 |
| 280 @Override | 286 @Override |
| 281 public int getPid() { | 287 public int getPid() { |
| 282 synchronized (mLock) { | 288 synchronized (mLock) { |
| 283 return mPid; | 289 return mPid; |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 return true; | 517 return true; |
| 512 } | 518 } |
| 513 return false; | 519 return false; |
| 514 } | 520 } |
| 515 | 521 |
| 516 @VisibleForTesting | 522 @VisibleForTesting |
| 517 public boolean isConnected() { | 523 public boolean isConnected() { |
| 518 return mService != null; | 524 return mService != null; |
| 519 } | 525 } |
| 520 } | 526 } |
| OLD | NEW |