| 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.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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |