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

Unified Diff: android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java

Issue 2611883002: Prepare to call GMS APIs from WebView (Closed)
Patch Set: Created 3 years, 12 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 | « android_webview/java/src/org/chromium/android_webview/AwMetricsServiceClient.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
diff --git a/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java b/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
index 8818ce0ffe80aa130af2fe31b9a84122f4bce74e..e38271d379baa8086b2f7fad1d8e6d0b86e67c10 100644
--- a/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
+++ b/android_webview/java/src/org/chromium/android_webview/PlatformServiceBridge.java
@@ -24,7 +24,7 @@ public class PlatformServiceBridge {
protected PlatformServiceBridge() {}
- public static PlatformServiceBridge getInstance(Context applicationContext) {
+ public static PlatformServiceBridge getInstance(Context appContext) {
if (sInstance != null) {
return sInstance;
}
@@ -33,7 +33,7 @@ public class PlatformServiceBridge {
try {
Class<?> cls = Class.forName(PLATFORM_SERVICE_BRIDGE);
sInstance = (PlatformServiceBridge) cls.getDeclaredConstructor(Context.class)
- .newInstance(applicationContext);
+ .newInstance(appContext);
return sInstance;
} catch (ClassNotFoundException e) {
// This is not an error; it just means this device doesn't have specialized services.
@@ -57,5 +57,9 @@ public class PlatformServiceBridge {
return false;
}
- public void setMetricsSettingListener(ValueCallback<Boolean> callback) {}
+ // Overriding implementations may call "callback" asynchronously, but they must still call
gsennton 2017/01/04 10:09:55 So we will use this method by spawning a new threa
paulmiller 2017/01/04 18:12:41 You could do that. I don't. See the AwMetricsServi
gsennton 2017/01/04 18:35:04 Well, I think we (silent feedback) would want to w
paulmiller 2017/01/04 18:45:00 If the worker thread is persistent, yes, that woul
gsennton 2017/01/04 20:31:01 Oops, I meant waiting in the worker thread as in s
sgurun-gerrit only 2017/01/04 20:33:05 As far as I remember GMSCore always calls you back
paulmiller 2017/01/04 22:26:12 By default, GMS calls back on the app's UI thread.
+ // "callback" on the same thread on which "queryMetricsEnabled" was called.
+ public void queryMetricsEnabled(ValueCallback<Boolean> callback) {
sgurun-gerrit only 2017/01/04 00:05:24 I prefer allowMetricsService() as the method name.
paulmiller 2017/01/04 00:10:15 Why is that? That sounds like we're setting someth
sgurun-gerrit only 2017/01/04 00:31:53 queryMetricsValue could be better choice. queryMet
paulmiller 2017/01/04 00:54:40 How about "queryMetricsSetting"? That's slightly m
+ callback.onReceiveValue(false);
+ }
}
« no previous file with comments | « android_webview/java/src/org/chromium/android_webview/AwMetricsServiceClient.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698