| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser.toolbar; | 5 package org.chromium.chrome.browser.toolbar; |
| 6 | 6 |
| 7 import android.animation.Animator; | 7 import android.animation.Animator; |
| 8 import android.animation.AnimatorListenerAdapter; | 8 import android.animation.AnimatorListenerAdapter; |
| 9 import android.animation.AnimatorSet; | 9 import android.animation.AnimatorSet; |
| 10 import android.annotation.SuppressLint; | 10 import android.annotation.SuppressLint; |
| (...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 } | 538 } |
| 539 | 539 |
| 540 /** | 540 /** |
| 541 * Triggered when the URL input field has gained or lost focus. | 541 * Triggered when the URL input field has gained or lost focus. |
| 542 * @param hasFocus Whether the URL field has gained focus. | 542 * @param hasFocus Whether the URL field has gained focus. |
| 543 */ | 543 */ |
| 544 protected void onUrlFocusChange(boolean hasFocus) { | 544 protected void onUrlFocusChange(boolean hasFocus) { |
| 545 mUrlHasFocus = hasFocus; | 545 mUrlHasFocus = hasFocus; |
| 546 } | 546 } |
| 547 | 547 |
| 548 protected boolean shouldShowMenuButton() { | |
| 549 return true; | |
| 550 } | |
| 551 | |
| 552 /** | 548 /** |
| 553 * Keeps track of the first time the toolbar is drawn. | 549 * Keeps track of the first time the toolbar is drawn. |
| 554 */ | 550 */ |
| 555 private void recordFirstDrawTime() { | 551 private void recordFirstDrawTime() { |
| 556 if (mFirstDrawTimeMs == 0) mFirstDrawTimeMs = SystemClock.elapsedRealtim
e(); | 552 if (mFirstDrawTimeMs == 0) mFirstDrawTimeMs = SystemClock.elapsedRealtim
e(); |
| 557 } | 553 } |
| 558 | 554 |
| 559 /** | 555 /** |
| 560 * Returns the elapsed realtime in ms of the time at which first draw for th
e toolbar occurred. | 556 * Returns the elapsed realtime in ms of the time at which first draw for th
e toolbar occurred. |
| 561 */ | 557 */ |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 } else { | 782 } else { |
| 787 mMenuButton.setContentDescription(getResources().getString( | 783 mMenuButton.setContentDescription(getResources().getString( |
| 788 R.string.accessibility_toolbar_btn_menu)); | 784 R.string.accessibility_toolbar_btn_menu)); |
| 789 } | 785 } |
| 790 } | 786 } |
| 791 | 787 |
| 792 @Override | 788 @Override |
| 793 public void setReturnButtonListener(View.OnClickListener listener) { | 789 public void setReturnButtonListener(View.OnClickListener listener) { |
| 794 } | 790 } |
| 795 } | 791 } |
| OLD | NEW |