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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java

Issue 2779543005: Add support for highlighting menu items (Closed)
Patch Set: Moved PulseDrawable Created 3 years, 8 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 unified diff | Download patch
OLDNEW
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.ValueAnimator; 9 import android.animation.ValueAnimator;
10 import android.animation.ValueAnimator.AnimatorUpdateListener; 10 import android.animation.ValueAnimator.AnimatorUpdateListener;
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 updateLayoutParams(); 627 updateLayoutParams();
628 super.onMeasure(widthMeasureSpec, heightMeasureSpec); 628 super.onMeasure(widthMeasureSpec, heightMeasureSpec);
629 } 629 }
630 630
631 @Override 631 @Override
632 public LocationBar getLocationBar() { 632 public LocationBar getLocationBar() {
633 return this; 633 return this;
634 } 634 }
635 635
636 @Override 636 @Override
637 public boolean useLightDrawables() {
638 return !mUseDarkColors;
639 }
640
641 @Override
637 public boolean onLongClick(View v) { 642 public boolean onLongClick(View v) {
638 if (v == mCloseButton) { 643 if (v == mCloseButton) {
639 return showAccessibilityToast(v, getResources().getString(R.string.c lose_tab)); 644 return showAccessibilityToast(v, getResources().getString(R.string.c lose_tab));
640 } else if (v == mCustomActionButton) { 645 } else if (v == mCustomActionButton) {
641 return showAccessibilityToast(v, mCustomActionButton.getContentDescr iption()); 646 return showAccessibilityToast(v, mCustomActionButton.getContentDescr iption());
642 } else if (v == mTitleUrlContainer) { 647 } else if (v == mTitleUrlContainer) {
643 ClipboardManager clipboard = (ClipboardManager) getContext() 648 ClipboardManager clipboard = (ClipboardManager) getContext()
644 .getSystemService(Context.CLIPBOARD_SERVICE); 649 .getSystemService(Context.CLIPBOARD_SERVICE);
645 Tab tab = getCurrentTab(); 650 Tab tab = getCurrentTab();
646 if (tab == null) return false; 651 if (tab == null) return false;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 public View getMenuButtonWrapper() { 734 public View getMenuButtonWrapper() {
730 // This class has no menu button wrapper, so return the menu button inst ead. 735 // This class has no menu button wrapper, so return the menu button inst ead.
731 return mMenuButton; 736 return mMenuButton;
732 } 737 }
733 738
734 @Override 739 @Override
735 public boolean mustQueryUrlBarLocationForSuggestions() { 740 public boolean mustQueryUrlBarLocationForSuggestions() {
736 return false; 741 return false;
737 } 742 }
738 } 743 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698