Chromium Code Reviews| 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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 637 }; | 637 }; |
| 638 | 638 |
| 639 if (mAssistStatusHandler != null) { | 639 if (mAssistStatusHandler != null) { |
| 640 mAssistStatusHandler.setTabModelSelector(mTabModelSelector); | 640 mAssistStatusHandler.setTabModelSelector(mTabModelSelector); |
| 641 } | 641 } |
| 642 | 642 |
| 643 mTabModelsInitialized = true; | 643 mTabModelsInitialized = true; |
| 644 } | 644 } |
| 645 | 645 |
| 646 /** | 646 /** |
| 647 * @return Whether this activity can automatically present WebVr content in fullscreen | |
| 648 * binocular rendering mode. Normally, WebVr presentation is user in itiated. | |
| 649 */ | |
| 650 public boolean canAutopresentVr() { | |
|
mthiesse
2017/05/10 14:52:14
I don't know what Ted's opinion on this is, but so
Ted C
2017/05/11 00:05:03
Adding this to VrShellDelegate sgtm and seems cons
ymalik
2017/05/11 03:32:27
Done.
| |
| 651 return false; | |
| 652 } | |
| 653 | |
| 654 /** | |
| 647 * @return The {@link TabModelSelector} owned by this {@link ChromeActivity} . | 655 * @return The {@link TabModelSelector} owned by this {@link ChromeActivity} . |
| 648 */ | 656 */ |
| 649 protected abstract TabModelSelector createTabModelSelector(); | 657 protected abstract TabModelSelector createTabModelSelector(); |
| 650 | 658 |
| 651 /** | 659 /** |
| 652 * @return The {@link org.chromium.chrome.browser.tabmodel.TabCreatorManager .TabCreator}s owned | 660 * @return The {@link org.chromium.chrome.browser.tabmodel.TabCreatorManager .TabCreator}s owned |
| 653 * by this {@link ChromeActivity}. The first item in the Pair is th e normal model tab | 661 * by this {@link ChromeActivity}. The first item in the Pair is th e normal model tab |
| 654 * creator, and the second is the tab creator for incognito tabs. | 662 * creator, and the second is the tab creator for incognito tabs. |
| 655 */ | 663 */ |
| 656 protected abstract Pair<? extends TabCreator, ? extends TabCreator> createTa bCreators(); | 664 protected abstract Pair<? extends TabCreator, ? extends TabCreator> createTa bCreators(); |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 785 ContextReporter.reportStatus(ContextReporter.STATUS_GSA_NOT_AVAILABL E); | 793 ContextReporter.reportStatus(ContextReporter.STATUS_GSA_NOT_AVAILABL E); |
| 786 } | 794 } |
| 787 | 795 |
| 788 // postDeferredStartupIfNeeded() is called in TabModelSelectorTabObsever #onLoadStopped(), | 796 // postDeferredStartupIfNeeded() is called in TabModelSelectorTabObsever #onLoadStopped(), |
| 789 // #onPageLoadFinished() and #onCrash(). If we are not actively loading a tab (e.g. | 797 // #onPageLoadFinished() and #onCrash(). If we are not actively loading a tab (e.g. |
| 790 // in Android N multi-instance, which is created by re-parenting an exis ting tab), | 798 // in Android N multi-instance, which is created by re-parenting an exis ting tab), |
| 791 // ensure onDeferredStartup() gets called by calling postDeferredStartup IfNeeded() here. | 799 // ensure onDeferredStartup() gets called by calling postDeferredStartup IfNeeded() here. |
| 792 if (mDeferredStartupQueued || getActivityTab() == null || !getActivityTa b().isLoading()) { | 800 if (mDeferredStartupQueued || getActivityTab() == null || !getActivityTa b().isLoading()) { |
| 793 postDeferredStartupIfNeeded(); | 801 postDeferredStartupIfNeeded(); |
| 794 } | 802 } |
| 803 | |
| 804 VrShellDelegate.onNewIntent(this, getIntent()); | |
|
mthiesse
2017/05/10 14:52:14
What happens when you use the task switcher to swi
Ted C
2017/05/11 00:05:03
Yes it would, why not have this in onNewIntentWith
ymalik
2017/05/11 03:32:27
Thanks for the tip. Done.
| |
| 795 } | 805 } |
| 796 | 806 |
| 797 @Override | 807 @Override |
| 798 public void onWindowFocusChanged(boolean hasFocus) { | 808 public void onWindowFocusChanged(boolean hasFocus) { |
| 799 super.onWindowFocusChanged(hasFocus); | 809 super.onWindowFocusChanged(hasFocus); |
| 800 | 810 |
| 801 maybeRemoveWindowBackground(); | 811 maybeRemoveWindowBackground(); |
| 802 | 812 |
| 803 Tab tab = getActivityTab(); | 813 Tab tab = getActivityTab(); |
| 804 if (tab == null) return; | 814 if (tab == null) return; |
| (...skipping 1392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2197 public void onExitVr() {} | 2207 public void onExitVr() {} |
| 2198 | 2208 |
| 2199 /** | 2209 /** |
| 2200 * Whether this Activity supports moving a {@link Tab} to the | 2210 * Whether this Activity supports moving a {@link Tab} to the |
| 2201 * {@link FullscreenWebContentsActivity} when it enters fullscreen. | 2211 * {@link FullscreenWebContentsActivity} when it enters fullscreen. |
| 2202 */ | 2212 */ |
| 2203 public boolean supportsFullscreenActivity() { | 2213 public boolean supportsFullscreenActivity() { |
| 2204 return false; | 2214 return false; |
| 2205 } | 2215 } |
| 2206 } | 2216 } |
| OLD | NEW |