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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwMetricsServiceClient.java

Issue 1474483004: WebView Metrics client implementation (Chromium part) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.android_webview;
6
7 import android.content.Context;
8 import android.webkit.ValueCallback;
9
10 import org.chromium.base.annotations.JNINamespace;
11
12 /**
13 * Java twin of the homonymous C++ class. The Java side is only responsible for
14 * switching metrics on and off. Since the setting is a platform feature, it
15 * must be obtained through PlatformServiceBridge.
16 */
17 @JNINamespace("android_webview")
18 public class AwMetricsServiceClient {
19 public AwMetricsServiceClient(Context applicationContext) {
20 PlatformServiceBridge.getInstance(applicationContext)
21 .setMetricsSettingListener(new ValueCallback<Boolean>() {
22 public void onReceiveValue(Boolean enabled) {
23 nativeSetMetricsEnabled(enabled);
24 }
25 });
26 }
27
28 public static native void nativeSetMetricsEnabled(boolean enabled);
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698