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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/WebApkNotificationClient.java

Issue 2012043002: Remove base dependency from webapk/libs/client (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | chrome/android/webapk/libs/client/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/notifications/WebApkNotificationClient.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/WebApkNotificationClient.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/WebApkNotificationClient.java
index 1814fed58cb637edad9efc8ea9af196e8e6228e5..7172c5a25f9362a103bc394cfa79c73419475a3c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/WebApkNotificationClient.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/WebApkNotificationClient.java
@@ -6,7 +6,7 @@ package org.chromium.chrome.browser.notifications;
import android.os.RemoteException;
-import org.chromium.base.Callback;
+import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.webapk.lib.client.WebApkServiceConnectionManager;
import org.chromium.webapk.lib.runtime_library.IWebApkApi;
@@ -19,11 +19,12 @@ public class WebApkNotificationClient {
private static final String TAG = "cr_WebApk";
// Callback which catches RemoteExceptions thrown due to IWebApkApi failure.
- private abstract static class ApiUseCallback extends Callback<IWebApkApi> {
+ private abstract static class ApiUseCallback
+ implements WebApkServiceConnectionManager.ConnectionCallback {
public abstract void useApi(IWebApkApi api) throws RemoteException;
@Override
- public void onResult(IWebApkApi api) {
+ public void onConnected(IWebApkApi api) {
try {
useApi(api);
} catch (RemoteException e) {
@@ -48,7 +49,8 @@ public class WebApkNotificationClient {
}
};
- WebApkServiceConnectionManager.getInstance().connect(webApkPackage, connectionCallback);
+ WebApkServiceConnectionManager.getInstance().connect(
+ ContextUtils.getApplicationContext(), webApkPackage, connectionCallback);
}
/**
@@ -62,6 +64,7 @@ public class WebApkNotificationClient {
api.cancelNotification(platformTag, platformID);
}
};
- WebApkServiceConnectionManager.getInstance().connect(webApkPackage, connectionCallback);
+ WebApkServiceConnectionManager.getInstance().connect(
+ ContextUtils.getApplicationContext(), webApkPackage, connectionCallback);
}
}
« no previous file with comments | « no previous file | chrome/android/webapk/libs/client/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698