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

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

Issue 1149213003: Don't update color in tabSwitcher Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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.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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698