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.tabmodel; | 5 package org.chromium.chrome.browser.tabmodel; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.os.Handler; | 8 import android.os.Handler; |
9 | 9 |
10 import org.chromium.base.metrics.RecordHistogram; | 10 import org.chromium.base.metrics.RecordHistogram; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 new TabModelSelectorTabObserver(this) { | 169 new TabModelSelectorTabObserver(this) { |
170 @Override | 170 @Override |
171 public void onUrlUpdated(Tab tab) { | 171 public void onUrlUpdated(Tab tab) { |
172 TabModel model = getModelForTabId(tab.getId()); | 172 TabModel model = getModelForTabId(tab.getId()); |
173 if (model == getCurrentModel()) { | 173 if (model == getCurrentModel()) { |
174 mTabContentManager.invalidateIfChanged(tab.getId(), tab.getU
rl()); | 174 mTabContentManager.invalidateIfChanged(tab.getId(), tab.getU
rl()); |
175 } | 175 } |
176 } | 176 } |
177 | 177 |
178 @Override | 178 @Override |
179 public void onLoadStopped(Tab tab) { | 179 public void onLoadStopped(Tab tab, boolean toDifferentDocument) { |
180 handleOnPageLoadStopped(tab); | 180 handleOnPageLoadStopped(tab); |
181 } | 181 } |
182 | 182 |
183 @Override | 183 @Override |
184 public void onPageLoadStarted(Tab tab, String url) { | 184 public void onPageLoadStarted(Tab tab, String url) { |
185 String previousUrl = tab.getUrl(); | 185 String previousUrl = tab.getUrl(); |
186 if (NativePageFactory.isNativePageUrl(previousUrl, tab.isIncogni
to())) { | 186 if (NativePageFactory.isNativePageUrl(previousUrl, tab.isIncogni
to())) { |
187 mTabContentManager.invalidateTabThumbnail(tab.getId(), previ
ousUrl); | 187 mTabContentManager.invalidateTabThumbnail(tab.getId(), previ
ousUrl); |
188 } else { | 188 } else { |
189 mTabContentManager.removeTabThumbnail(tab.getId()); | 189 mTabContentManager.removeTabThumbnail(tab.getId()); |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
390 public boolean isSessionRestoreInProgress() { | 390 public boolean isSessionRestoreInProgress() { |
391 return mSessionRestoreInProgress.get(); | 391 return mSessionRestoreInProgress.get(); |
392 } | 392 } |
393 | 393 |
394 // TODO(tedchoc): Remove the need for this to be exposed. | 394 // TODO(tedchoc): Remove the need for this to be exposed. |
395 @Override | 395 @Override |
396 public void notifyChanged() { | 396 public void notifyChanged() { |
397 super.notifyChanged(); | 397 super.notifyChanged(); |
398 } | 398 } |
399 } | 399 } |
OLD | NEW |