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.document; | 5 package org.chromium.chrome.browser.document; |
6 | 6 |
7 import android.annotation.TargetApi; | 7 import android.annotation.TargetApi; |
8 import android.content.Intent; | 8 import android.content.Intent; |
9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.os.Build; | 10 import android.os.Build; |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 | 582 |
583 @Override | 583 @Override |
584 public void onDidNavigateMainFrame(Tab tab, String url, String baseU
rl, | 584 public void onDidNavigateMainFrame(Tab tab, String url, String baseU
rl, |
585 boolean isNavigationToDifferentPage, boolean isFragmentNavig
ation, | 585 boolean isNavigationToDifferentPage, boolean isFragmentNavig
ation, |
586 int statusCode) { | 586 int statusCode) { |
587 if (!isNavigationToDifferentPage) return; | 587 if (!isNavigationToDifferentPage) return; |
588 mLargestFavicon = null; | 588 mLargestFavicon = null; |
589 } | 589 } |
590 | 590 |
591 @Override | 591 @Override |
592 public void onLoadStopped(Tab tab) { | 592 public void onLoadStopped(Tab tab, boolean toDifferentDocument) { |
593 assert mDocumentTab == tab; | 593 assert mDocumentTab == tab; |
594 | 594 |
595 updateTaskDescription(); | 595 updateTaskDescription(); |
596 mTabModel.updateEntry(getIntent(), mDocumentTab); | 596 mTabModel.updateEntry(getIntent(), mDocumentTab); |
597 } | 597 } |
598 | 598 |
599 @Override | 599 @Override |
600 public void onDidChangeThemeColor(Tab tab, int color) { | 600 public void onDidChangeThemeColor(Tab tab, int color) { |
601 updateTaskDescription(); | 601 updateTaskDescription(); |
602 } | 602 } |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
849 | 849 |
850 /** | 850 /** |
851 * Launch a new DocumentActivity showing the new tab page. | 851 * Launch a new DocumentActivity showing the new tab page. |
852 * @param incognito Whether the new NTP should be in incognito mode. | 852 * @param incognito Whether the new NTP should be in incognito mode. |
853 */ | 853 */ |
854 private void launchNtp(boolean incognito) { | 854 private void launchNtp(boolean incognito) { |
855 if (incognito && !PrefServiceBridge.getInstance().isIncognitoModeEnabled
()) return; | 855 if (incognito && !PrefServiceBridge.getInstance().isIncognitoModeEnabled
()) return; |
856 getTabCreator(incognito).launchNTP(); | 856 getTabCreator(incognito).launchNTP(); |
857 } | 857 } |
858 } | 858 } |
OLD | NEW |