Chromium Code Reviews| 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.content.Context; | 7 import android.content.Context; |
| 8 import android.os.Handler; | 8 import android.os.Handler; |
| 9 import android.os.Looper; | 9 import android.os.Looper; |
| 10 import android.os.Message; | 10 import android.os.Message; |
| (...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 633 mFullscreenManager.hideControlsPersistent(mFullscreenFocusToken); | 633 mFullscreenManager.hideControlsPersistent(mFullscreenFocusToken); |
| 634 mFullscreenFocusToken = FullscreenManager.INVALID_TOKEN; | 634 mFullscreenFocusToken = FullscreenManager.INVALID_TOKEN; |
| 635 } | 635 } |
| 636 } | 636 } |
| 637 | 637 |
| 638 /** | 638 /** |
| 639 * Update the primary color used by the model to the given color. | 639 * Update the primary color used by the model to the given color. |
| 640 * @param color The primary color for the current tab. | 640 * @param color The primary color for the current tab. |
| 641 */ | 641 */ |
| 642 public void updatePrimaryColor(int color) { | 642 public void updatePrimaryColor(int color) { |
| 643 boolean colorChanged = mToolbarModel.getPrimaryColor() != color; | |
|
Ted C
2015/05/26 18:44:35
why did this need to be removed?
Yusuf
2015/05/26 18:57:23
Changing this flow so that we now always get color
Yusuf
2015/05/26 20:43:19
Removed all the changes related with this since th
| |
| 644 if (!colorChanged) return; | |
| 645 | |
| 646 mToolbarModel.setPrimaryColor(color); | 643 mToolbarModel.setPrimaryColor(color); |
| 647 mToolbar.onPrimaryColorChanged(); | 644 mToolbar.checkPrimaryColorTransition(); |
|
Ted C
2015/05/26 18:44:35
I think the previous name was clearer and more con
| |
| 648 } | 645 } |
| 649 | 646 |
| 650 /** | 647 /** |
| 651 * Updates the current number of Tabs based on the TabModel this Toolbar con tains. | 648 * Updates the current number of Tabs based on the TabModel this Toolbar con tains. |
| 652 */ | 649 */ |
| 653 private void updateTabCount() { | 650 private void updateTabCount() { |
| 654 if (!mTabRestoreCompleted) return; | 651 if (!mTabRestoreCompleted) return; |
| 655 mToolbar.updateTabCountVisuals(mTabModelSelector.getCurrentModel().getCo unt()); | 652 mToolbar.updateTabCountVisuals(mTabModelSelector.getCurrentModel().getCo unt()); |
| 656 } | 653 } |
| 657 | 654 |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 852 } | 849 } |
| 853 | 850 |
| 854 /** | 851 /** |
| 855 * Cancels simulating load progress. | 852 * Cancels simulating load progress. |
| 856 */ | 853 */ |
| 857 public void cancel() { | 854 public void cancel() { |
| 858 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS); | 855 mHandler.removeMessages(MSG_ID_UPDATE_PROGRESS); |
| 859 } | 856 } |
| 860 } | 857 } |
| 861 } | 858 } |
| OLD | NEW |