|
|
DescriptionNavigation buttons should not enable if user can not navigate
Added code to enable/disable navigation buttons(prev/Next).
Prev button will be enable only if user can navigate in back direction and
similarly Next button will be enable only if user can navigate in forward direction.
BUG=374702
NOTRY=true
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272288
Patch Set 1 #Patch Set 2 : Modified code as suggested #
Total comments: 1
Patch Set 3 : Modified code as suggested #Patch Set 4 : Corrected spacing problem and modified java doc #
Messages
Total messages: 37 (0 generated)
PTAL
Instead of hiding the controls, it should just be setting them to disabled like on other platforms. We should hook into PlatformEnableUIControl and do the correct thing on Android as well.
PTAL new patch
https://codereview.chromium.org/287373002/diff/20001/content/shell/android/ja... File content/shell/android/java/src/org/chromium/content_shell/Shell.java (right): https://codereview.chromium.org/287373002/diff/20001/content/shell/android/ja... content/shell/android/java/src/org/chromium/content_shell/Shell.java:233: mPrevButton.setEnabled(mContentViewCore.canGoBack()); In my previous comment, I meant that we should actually be hooking directly into PlatformEnableUIControl in shell_android.cc. Currently that method is empty, but we should just add a new method in java: @CalledByNative private void enableUiControl(int controlId, boolean enabled) { if (controlId == 0) mPrevButton.setEnabled(enabled); else if (controlId == 1) mNextButton.setEnabled(enabled); } Then we just call that from shell_android and that keeps the android port closer to the other platforms.
Sorry for misunderstanding. I have made changes as suggested. Added a new @CalledByNative in java side and calling it from shell_android. It will take care of updating the navigation buttons accordingly. PTAL new patch set.
lgtm thanks!
The CQ bit was checked by ankit2.kumar@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ankit2.kumar@samsung.com/287373002/60001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: android_dbg_triggered_tests on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was checked by ankit2.kumar@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ankit2.kumar@samsung.com/287373002/60001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
On 2014/05/22 12:59:36, I haz the power (commit-bot) wrote: > Try jobs failed on following builders: > win_gpu_triggered_tests on tryserver.chromium.gpu > (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...) @Ted C I am not able to find out build failure reason. Changes done in this CL should not cause any build failure. PTAL
The CQ bit was checked by tedchoc@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ankit2.kumar@samsung.com/287373002/60001
On 2014/05/22 13:32:31, ankit2.kumar wrote: > On 2014/05/22 12:59:36, I haz the power (commit-bot) wrote: > > Try jobs failed on following builders: > > win_gpu_triggered_tests on tryserver.chromium.gpu > > > (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...) > > @Ted C > I am not able to find out build failure reason. Changes done in this CL should > not cause any build failure. > PTAL These look like flakes. I'll just check the commit box again. If it keeps happening on the same bot for the same tests then it will be suspicious about this change, but thus far it seems random.
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
On 2014/05/22 16:06:40, I haz the power (commit-bot) wrote: > Try jobs failed on following builders: > win_gpu_triggered_tests on tryserver.chromium.gpu > (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...) @Ted C Please suggest what to do further.
The CQ bit was checked by ankit2.kumar@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ankit2.kumar@samsung.com/287373002/60001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was checked by ankit2.kumar@samsung.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ankit2.kumar@samsung.com/287373002/60001
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are real, and report flakes to chrome-troopers@google.com. The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered...)
The CQ bit was checked by tedchoc@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/ankit2.kumar@samsung.com/287373002/60001
Message was sent while issue was closed.
Change committed as 272288 |