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

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

Issue 2290953002: Fix security icon colors on light themes (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 if (securityLevel == ConnectionSecurityLevel.NONE) { 501 if (securityLevel == ConnectionSecurityLevel.NONE) {
502 mAnimDelegate.hideSecurityButton(); 502 mAnimDelegate.hideSecurityButton();
503 } else { 503 } else {
504 boolean isSmallDevice = !DeviceFormFactor.isTablet(getContext()); 504 boolean isSmallDevice = !DeviceFormFactor.isTablet(getContext());
505 int id = LocationBarLayout.getSecurityIconResource(securityLevel, is SmallDevice); 505 int id = LocationBarLayout.getSecurityIconResource(securityLevel, is SmallDevice);
506 if (id == 0) { 506 if (id == 0) {
507 mSecurityButton.setImageDrawable(null); 507 mSecurityButton.setImageDrawable(null);
508 } else { 508 } else {
509 // ImageView#setImageResource is no-op if given resource is the current one. 509 // ImageView#setImageResource is no-op if given resource is the current one.
510 mSecurityButton.setImageResource(id); 510 mSecurityButton.setImageResource(id);
511 mSecurityButton.setTint(LocationBarLayout.getColorStateList( 511 mSecurityButton.setTint(
512 securityLevel, getToolbarDataProvider(), getResources()) ); 512 LocationBarLayout.getColorStateList(securityLevel, getTo olbarDataProvider(),
513 getResources(), false /* omnibox is not opaque * /));
513 } 514 }
514 mAnimDelegate.showSecurityButton(); 515 mAnimDelegate.showSecurityButton();
515 } 516 }
516 mUrlBar.emphasizeUrl(); 517 mUrlBar.emphasizeUrl();
517 mUrlBar.invalidate(); 518 mUrlBar.invalidate();
518 } 519 }
519 520
520 private void showOfflineBoltIfNecessary() { 521 private void showOfflineBoltIfNecessary() {
521 boolean isOfflinePage = getCurrentTab() != null && getCurrentTab().isOff linePage(); 522 boolean isOfflinePage = getCurrentTab() != null && getCurrentTab().isOff linePage();
522 if (isOfflinePage == mShowsOfflinePage) return; 523 if (isOfflinePage == mShowsOfflinePage) return;
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 757
757 @Override 758 @Override
758 protected void setAppMenuUpdateBadgeToVisible(boolean animate) {} 759 protected void setAppMenuUpdateBadgeToVisible(boolean animate) {}
759 760
760 @Override 761 @Override
761 public View getMenuButtonWrapper() { 762 public View getMenuButtonWrapper() {
762 // This class has no menu button wrapper, so return the menu button inst ead. 763 // This class has no menu button wrapper, so return the menu button inst ead.
763 return mMenuButton; 764 return mMenuButton;
764 } 765 }
765 } 766 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698