| 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.compositor.layouts; | 5 package org.chromium.chrome.browser.compositor.layouts; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
| 9 import android.text.TextUtils; | 9 import android.text.TextUtils; |
| 10 import android.view.ViewGroup; | 10 import android.view.ViewGroup; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 247 } | 247 } |
| 248 }; | 248 }; |
| 249 selector.addObserver(mTabModelSelectorObserver); | 249 selector.addObserver(mTabModelSelectorObserver); |
| 250 selector.setCloseAllTabsDelegate(this); | 250 selector.setCloseAllTabsDelegate(this); |
| 251 | 251 |
| 252 mTabModelObserver = createTabModelObserver(); | 252 mTabModelObserver = createTabModelObserver(); |
| 253 for (TabModel model : selector.getModels()) model.addObserver(mTabModelO
bserver); | 253 for (TabModel model : selector.getModels()) model.addObserver(mTabModelO
bserver); |
| 254 | 254 |
| 255 mTabSelectorTabObserver = new TabModelSelectorTabObserver(selector) { | 255 mTabSelectorTabObserver = new TabModelSelectorTabObserver(selector) { |
| 256 @Override | 256 @Override |
| 257 public void onLoadStarted(Tab tab) { | 257 public void onLoadStarted(Tab tab, boolean toDifferentDocument) { |
| 258 tabLoadStarted(tab.getId(), tab.isIncognito()); | 258 tabLoadStarted(tab.getId(), tab.isIncognito()); |
| 259 } | 259 } |
| 260 | 260 |
| 261 @Override | 261 @Override |
| 262 public void onLoadStopped(Tab tab) { | 262 public void onLoadStopped(Tab tab, boolean toDifferentDocument) { |
| 263 tabLoadFinished(tab.getId(), tab.isIncognito()); | 263 tabLoadFinished(tab.getId(), tab.isIncognito()); |
| 264 } | 264 } |
| 265 | 265 |
| 266 @Override | 266 @Override |
| 267 public void onPageLoadStarted(Tab tab, String url) { | 267 public void onPageLoadStarted(Tab tab, String url) { |
| 268 tabPageLoadStarted(tab.getId(), tab.isIncognito()); | 268 tabPageLoadStarted(tab.getId(), tab.isIncognito()); |
| 269 } | 269 } |
| 270 | 270 |
| 271 @Override | 271 @Override |
| 272 public void onPageLoadFinished(Tab tab) { | 272 public void onPageLoadFinished(Tab tab) { |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 745 | 745 |
| 746 /** | 746 /** |
| 747 * @param id The id of the {@link Tab} to search for. | 747 * @param id The id of the {@link Tab} to search for. |
| 748 * @return A {@link Tab} instance or {@code null} if it could be found. | 748 * @return A {@link Tab} instance or {@code null} if it could be found. |
| 749 */ | 749 */ |
| 750 protected Tab getTabById(int id) { | 750 protected Tab getTabById(int id) { |
| 751 TabModelSelector selector = getTabModelSelector(); | 751 TabModelSelector selector = getTabModelSelector(); |
| 752 return selector == null ? null : selector.getTabById(id); | 752 return selector == null ? null : selector.getTabById(id); |
| 753 } | 753 } |
| 754 } | 754 } |
| OLD | NEW |