Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4666)

Unified Diff: chrome/android/webapk/shell_apk/src/org/chromium/webapk/shell_apk/IdentityService.java

Issue 2974573002: Refactor WebApkServiceConnectionManager. (Closed)
Patch Set: Call the callback on UI thread if bindService() fails. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698