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

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

Issue 287373002: Navigation buttons should not enable if user can not navigate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected spacing problem and modified java doc Created 6 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
« no previous file with comments | « no previous file | content/shell/browser/shell_android.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9e01a9df7abfab800e63c719bd8899d005c53dec..2b63bc0273f7b3d3d7eb7982adbfc9fae9e3f297 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
@@ -268,6 +268,18 @@ public class Shell extends LinearLayout {
}
/**
+ * Enable/Disable navigation(Prev/Next) button if navigation is allowed/disallowed
+ * in respective direction.
+ * @param controlId Id of button to update
+ * @param enabled enable/disable value
+ */
+ @CalledByNative
+ private void enableUiControl(int controlId, boolean enabled) {
+ if (controlId == 0) mPrevButton.setEnabled(enabled);
+ else if (controlId == 1) mNextButton.setEnabled(enabled);
+ }
+
+ /**
* @return The {@link ViewGroup} currently shown by this Shell.
*/
public ViewGroup getContentView() {
« no previous file with comments | « no previous file | content/shell/browser/shell_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698