| 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; | 5 package org.chromium.chrome.browser; |
| 6 | 6 |
| 7 import android.annotation.SuppressLint; | 7 import android.annotation.SuppressLint; |
| 8 import android.annotation.TargetApi; | 8 import android.annotation.TargetApi; |
| 9 import android.app.Activity; | 9 import android.app.Activity; |
| 10 import android.app.SearchManager; | 10 import android.app.SearchManager; |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1422 OfflinePageUtils.saveBookmarkOffline(newBookmarkId, tabT
oBookmark); | 1422 OfflinePageUtils.saveBookmarkOffline(newBookmarkId, tabT
oBookmark); |
| 1423 } | 1423 } |
| 1424 } else { | 1424 } else { |
| 1425 bookmarkModel.destroy(); | 1425 bookmarkModel.destroy(); |
| 1426 } | 1426 } |
| 1427 } | 1427 } |
| 1428 }); | 1428 }); |
| 1429 } | 1429 } |
| 1430 | 1430 |
| 1431 /** | 1431 /** |
| 1432 * @return Whether the tab models have been fully initialized. |
| 1433 */ |
| 1434 public boolean areTabModelsInitialized() { |
| 1435 return mTabModelsInitialized; |
| 1436 } |
| 1437 |
| 1438 /** |
| 1432 * {@link TabModelSelector} no longer implements TabModel. Use getTabModelS
elector() or | 1439 * {@link TabModelSelector} no longer implements TabModel. Use getTabModelS
elector() or |
| 1433 * getCurrentTabModel() depending on your needs. | 1440 * getCurrentTabModel() depending on your needs. |
| 1434 * @return The {@link TabModelSelector}, possibly null. | 1441 * @return The {@link TabModelSelector}, possibly null. |
| 1435 */ | 1442 */ |
| 1436 public TabModelSelector getTabModelSelector() { | 1443 public TabModelSelector getTabModelSelector() { |
| 1437 if (!mTabModelsInitialized) { | 1444 if (!mTabModelsInitialized) { |
| 1438 throw new IllegalStateException( | 1445 throw new IllegalStateException( |
| 1439 "Attempting to access TabModelSelector before initialization
"); | 1446 "Attempting to access TabModelSelector before initialization
"); |
| 1440 } | 1447 } |
| 1441 return mTabModelSelector; | 1448 return mTabModelSelector; |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2130 * draw over VR contents should be hidden in this call. | 2137 * draw over VR contents should be hidden in this call. |
| 2131 */ | 2138 */ |
| 2132 public void onEnterVR() {} | 2139 public void onEnterVR() {} |
| 2133 | 2140 |
| 2134 /** | 2141 /** |
| 2135 * Called when VR mode using this activity is exited. Any state set for VR s
hould be restored | 2142 * Called when VR mode using this activity is exited. Any state set for VR s
hould be restored |
| 2136 * in this call, including showing 2D UI that was hidden. | 2143 * in this call, including showing 2D UI that was hidden. |
| 2137 */ | 2144 */ |
| 2138 public void onExitVR() {} | 2145 public void onExitVR() {} |
| 2139 } | 2146 } |
| OLD | NEW |