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

Unified Diff: content/shell/android/java/src/org/chromium/content_shell/Shell.java

Issue 2431753002: Mus experiment in content shell on Android.
Patch Set: Fix mac bot Created 4 years, 1 month 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: content/shell/android/java/src/org/chromium/content_shell/Shell.java
diff --git a/content/shell/android/java/src/org/chromium/content_shell/Shell.java b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
index 7cc7a7261b451bc2eb7201aa8705fc9cad7be227..73c95627ca19af438f6f6cadb615a791915f5ba5 100644
--- a/content/shell/android/java/src/org/chromium/content_shell/Shell.java
+++ b/content/shell/android/java/src/org/chromium/content_shell/Shell.java
@@ -20,6 +20,7 @@ import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.TextView.OnEditorActionListener;
+import android.widget.Toast;
import org.chromium.base.annotations.CalledByNative;
import org.chromium.base.annotations.JNINamespace;
@@ -58,6 +59,7 @@ public class Shell extends LinearLayout {
private ImageButton mPrevButton;
private ImageButton mNextButton;
private ImageButton mStopReloadButton;
+ private ImageButton mMusButton;
private ClipDrawable mProgressDrawable;
@@ -242,6 +244,17 @@ public class Shell extends LinearLayout {
else mNavigationController.reload(true);
}
});
+ if (nativeShowMusDemoButton()) {
+ mMusButton = (ImageButton) findViewById(R.id.show_mus);
+ mMusButton.setVisibility(View.VISIBLE);
+ mMusButton.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ Toast.makeText(getContext(), "Showing Mus demo", Toast.LENGTH_SHORT).show();
+ nativeStartMusDemo(mNativeShell);
+ }
+ });
+ }
}
@SuppressWarnings("unused")
@@ -373,4 +386,6 @@ public class Shell extends LinearLayout {
}
private static native void nativeCloseShell(long shellPtr);
+ private static native boolean nativeShowMusDemoButton();
+ private native void nativeStartMusDemo(long nativeShell);
}

Powered by Google App Engine
This is Rietveld 408576698