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

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

Issue 1874953003: Progress bar color is based on toolbar color (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@progressbar-improvements-final
Patch Set: get color from ColorDrawable Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java » ('j') | 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.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.res.Configuration; 10 import android.content.res.Configuration;
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 updateButtonsTint(); 359 updateButtonsTint();
360 mUrlBar.setUseDarkTextColors(mUseDarkColors); 360 mUrlBar.setUseDarkTextColors(mUseDarkColors);
361 361
362 int titleTextColor = mUseDarkColors 362 int titleTextColor = mUseDarkColors
363 ? ApiCompatibilityUtils.getColor(resources, R.color.url_emphasis _default_text) 363 ? ApiCompatibilityUtils.getColor(resources, R.color.url_emphasis _default_text)
364 : ApiCompatibilityUtils.getColor(resources, 364 : ApiCompatibilityUtils.getColor(resources,
365 R.color.url_emphasis_light_default_text); 365 R.color.url_emphasis_light_default_text);
366 mTitleBar.setTextColor(titleTextColor); 366 mTitleBar.setTextColor(titleTextColor);
367 367
368 if (getProgressBar() != null) { 368 if (getProgressBar() != null) {
369 if (!mUseDarkColors) { 369 if (!ColorUtils.isUsingDefaultToolbarColor(getResources(),
370 getProgressBar().setBackgroundColor(ColorUtils 370 getBackground().getColor())) {
371 .getLightProgressbarBackground(getToolbarDataProvider(). getPrimaryColor())); 371 getProgressBar().setThemeColor(getToolbarDataProvider().getPrima ryColor(), false);
372 getProgressBar().setForegroundColor(ApiCompatibilityUtils.getCol or(resources,
373 R.color.progress_bar_foreground_white));
374 } else { 372 } else {
375 getProgressBar().setBackgroundColor(ApiCompatibilityUtils.getCol or(resources, 373 getProgressBar().setBackgroundColor(ApiCompatibilityUtils.getCol or(resources,
376 R.color.progress_bar_background)); 374 R.color.progress_bar_background));
377 getProgressBar().setForegroundColor(ApiCompatibilityUtils.getCol or(resources, 375 getProgressBar().setForegroundColor(ApiCompatibilityUtils.getCol or(resources,
378 R.color.progress_bar_foreground)); 376 R.color.progress_bar_foreground));
379 } 377 }
380 } 378 }
381 } 379 }
382 380
383 private void updateButtonsTint() { 381 private void updateButtonsTint() {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 663
666 @Override 664 @Override
667 protected void setAppMenuUpdateBadgeToVisible(boolean animate) {} 665 protected void setAppMenuUpdateBadgeToVisible(boolean animate) {}
668 666
669 @Override 667 @Override
670 public View getMenuButtonWrapper() { 668 public View getMenuButtonWrapper() {
671 // This class has no menu button wrapper, so return the menu button inst ead. 669 // This class has no menu button wrapper, so return the menu button inst ead.
672 return mMenuButton; 670 return mMenuButton;
673 } 671 }
674 } 672 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarPhone.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698