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

Unified Diff: blimp/client/app/android/java/src/org/chromium/blimp/BlimpRendererActivity.java

Issue 1962393004: Added a debug info UI for Blimp (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Built debug UI 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
Index: blimp/client/app/android/java/src/org/chromium/blimp/BlimpRendererActivity.java
diff --git a/blimp/client/app/android/java/src/org/chromium/blimp/BlimpRendererActivity.java b/blimp/client/app/android/java/src/org/chromium/blimp/BlimpRendererActivity.java
index cd830b17b1aba6d5e200fea9d0bc964f633cfaa1..35c9122530dcd719231eaae8b105ce3e2a9605c9 100644
--- a/blimp/client/app/android/java/src/org/chromium/blimp/BlimpRendererActivity.java
+++ b/blimp/client/app/android/java/src/org/chromium/blimp/BlimpRendererActivity.java
@@ -8,6 +8,8 @@ import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
+import android.view.View;
+import android.widget.TextView;
import org.chromium.base.Log;
import org.chromium.base.annotations.SuppressFBWarnings;
@@ -164,6 +166,11 @@ public class BlimpRendererActivity
handleUrlFromIntent(getIntent());
}
+ public void showDebugView(boolean show) {
+ View debugView = findViewById(R.id.debug_stats);
+ debugView.setVisibility(show ? View.VISIBLE : View.INVISIBLE);
+ }
+
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
@@ -234,6 +241,16 @@ public class BlimpRendererActivity
}
@Override
+ public void updateDebugInfo(int received, int sent, int commits) {
+ TextView tv = (TextView) findViewById(R.id.bytes_received_client);
+ tv.setText(String.valueOf(received / 1000));
+ tv = (TextView) findViewById(R.id.bytes_sent_client);
+ tv.setText(String.valueOf(sent / 1000));
+ tv = (TextView) findViewById(R.id.commit_count);
+ tv.setText(String.valueOf(commits));
+ }
+
+ @Override
public void onDisconnected(String reason) {
Toast.makeText(this,
String.format(getResources().getString(R.string.network_disconnected), reason),

Powered by Google App Engine
This is Rietveld 408576698