Chromium Code Reviews| Index: chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/IdentityService.java |
| diff --git a/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/IdentityService.java b/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/IdentityService.java |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..35aebae846df07cc361c4bc35029e7946036ef59 |
| --- /dev/null |
| +++ b/chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/IdentityService.java |
| @@ -0,0 +1,25 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +package org.chromium.webapk.shell_apk; |
| + |
| +import android.app.Service; |
| +import android.content.Intent; |
| +import android.os.IBinder; |
| + |
| +import org.chromium.webapk.lib.common.IdentityService.IIdentityService; |
| + |
| +/** IdentityService allows browsers to commnicate with WebAPK, e.g querying its runtime host. */ |
|
pkotwicz
2017/07/14 23:20:05
Would it be more accurate to say that the "Identit
Xi Han
2017/07/17 20:45:32
Done.
|
| +public class IdentityService extends Service { |
| + private final IIdentityService.Stub mBinder = new IIdentityService.Stub() { |
| + public String getRuntimeHostBrowserPackageName() { |
| + return WebApkUtils.getHostBrowserPackageName(getApplicationContext()); |
| + } |
| + }; |
| + |
| + @Override |
| + public IBinder onBind(Intent intent) { |
| + return mBinder; |
| + } |
| +} |