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.ActivityManager; | 10 import android.app.ActivityManager; |
(...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 } else { | 988 } else { |
989 RecordUserAction.record("MobileTabbedModeViewIntentFromApp"); | 989 RecordUserAction.record("MobileTabbedModeViewIntentFromApp"); |
990 } | 990 } |
991 | 991 |
992 if (getBottomSheet() != null) { | 992 if (getBottomSheet() != null) { |
993 // Either a new tab is opening, a tab is being clobbered, or a t
ab is being brought | 993 // Either a new tab is opening, a tab is being clobbered, or a t
ab is being brought |
994 // to the front. In all scenarios, the bottom sheet should be cl
osed. | 994 // to the front. In all scenarios, the bottom sheet should be cl
osed. |
995 getBottomSheet().setSheetState(BottomSheet.SHEET_STATE_PEEK, tru
e); | 995 getBottomSheet().setSheetState(BottomSheet.SHEET_STATE_PEEK, tru
e); |
996 } | 996 } |
997 | 997 |
| 998 // We send this intent so that we can enter WebVr presentation mode
if needed. This |
| 999 // call doesn't consume the intent because it also has the url that
we need to load. |
| 1000 VrShellDelegate.onNewIntent(intent); |
| 1001 |
998 TabModel tabModel = getCurrentTabModel(); | 1002 TabModel tabModel = getCurrentTabModel(); |
999 boolean fromLauncherShortcut = IntentUtils.safeGetBooleanExtra( | 1003 boolean fromLauncherShortcut = IntentUtils.safeGetBooleanExtra( |
1000 intent, IntentHandler.EXTRA_INVOKED_FROM_SHORTCUT, false); | 1004 intent, IntentHandler.EXTRA_INVOKED_FROM_SHORTCUT, false); |
1001 switch (tabOpenType) { | 1005 switch (tabOpenType) { |
1002 case REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB: | 1006 case REUSE_URL_MATCHING_TAB_ELSE_NEW_TAB: |
1003 // Used by the bookmarks application. | 1007 // Used by the bookmarks application. |
1004 if (tabModel.getCount() > 0 && mUIInitialized | 1008 if (tabModel.getCount() > 0 && mUIInitialized |
1005 && mLayoutManager.overviewVisible()) { | 1009 && mLayoutManager.overviewVisible()) { |
1006 mLayoutManager.hideOverview(true); | 1010 mLayoutManager.hideOverview(true); |
1007 } | 1011 } |
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2040 if (info.id == sMergedInstanceTaskId) return true; | 2044 if (info.id == sMergedInstanceTaskId) return true; |
2041 } | 2045 } |
2042 return false; | 2046 return false; |
2043 } | 2047 } |
2044 | 2048 |
2045 @Override | 2049 @Override |
2046 public boolean supportsFullscreenActivity() { | 2050 public boolean supportsFullscreenActivity() { |
2047 return true; | 2051 return true; |
2048 } | 2052 } |
2049 } | 2053 } |
OLD | NEW |