| Index: blimp/client/app/android/java/src/org/chromium/blimp/session/BlimpClientSession.java
|
| diff --git a/blimp/client/app/android/java/src/org/chromium/blimp/session/BlimpClientSession.java b/blimp/client/app/android/java/src/org/chromium/blimp/session/BlimpClientSession.java
|
| index d16cbc2703d2178dfc79b1e6ca870fb61721f499..26c3d8e126fd4bd6f0f6f116456c6e269c8485f8 100644
|
| --- a/blimp/client/app/android/java/src/org/chromium/blimp/session/BlimpClientSession.java
|
| +++ b/blimp/client/app/android/java/src/org/chromium/blimp/session/BlimpClientSession.java
|
| @@ -47,6 +47,14 @@ public class BlimpClientSession {
|
| * and their explanations.
|
| */
|
| void onDisconnected(String reason);
|
| +
|
| + /**
|
| + * Called to update the debug UI about network statistics for the current web page.
|
| + * @param received Number of bytes received.
|
| + * @param sent Number of bytes sent.
|
| + * @param commit Number of commits completed.
|
| + */
|
| + void updateDebugInfo(int received, int sent, int commit);
|
| }
|
|
|
| private final String mAssignerUrl;
|
| @@ -142,6 +150,12 @@ public class BlimpClientSession {
|
| }
|
| }
|
|
|
| + public void enableDebugInfo(boolean enable) {
|
| + if (mNativeBlimpClientSessionAndroidPtr == 0) return;
|
| +
|
| + nativeEnableDebugInfo(mNativeBlimpClientSessionAndroidPtr, enable);
|
| + }
|
| +
|
| @CalledByNative
|
| void onConnected() {
|
| for (ConnectionObserver observer : mObservers) {
|
| @@ -162,7 +176,15 @@ public class BlimpClientSession {
|
| return mNativeBlimpClientSessionAndroidPtr;
|
| }
|
|
|
| + @CalledByNative
|
| + private void updateDebugInfo(int received, int sent, int commits) {
|
| + for (ConnectionObserver observer : mObservers) {
|
| + observer.updateDebugInfo(received, sent, commits);
|
| + }
|
| + }
|
| +
|
| private native long nativeInit(String assignerUrl);
|
| private native void nativeConnect(long nativeBlimpClientSessionAndroid, String token);
|
| private native void nativeDestroy(long nativeBlimpClientSessionAndroid);
|
| + private native void nativeEnableDebugInfo(long nativeBlimpClientSessionAndroid, boolean enable);
|
| }
|
|
|