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 1978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1989 super.onEnterVr(); | 1989 super.onEnterVr(); |
1990 mControlContainer.setVisibility(View.INVISIBLE); | 1990 mControlContainer.setVisibility(View.INVISIBLE); |
1991 } | 1991 } |
1992 | 1992 |
1993 @Override | 1993 @Override |
1994 public void onExitVr() { | 1994 public void onExitVr() { |
1995 super.onExitVr(); | 1995 super.onExitVr(); |
1996 mControlContainer.setVisibility(View.VISIBLE); | 1996 mControlContainer.setVisibility(View.VISIBLE); |
1997 } | 1997 } |
1998 | 1998 |
| 1999 @Override |
| 2000 public boolean canAutopresentVr() { |
| 2001 return true; |
| 2002 } |
| 2003 |
1999 /** | 2004 /** |
2000 * Reports that a new tab launcher shortcut was selected or an action equiva
lent to a shortcut | 2005 * Reports that a new tab launcher shortcut was selected or an action equiva
lent to a shortcut |
2001 * was performed. | 2006 * was performed. |
2002 * @param isIncognito Whether the shortcut or action created a new incognito
tab. | 2007 * @param isIncognito Whether the shortcut or action created a new incognito
tab. |
2003 */ | 2008 */ |
2004 @TargetApi(Build.VERSION_CODES.N_MR1) | 2009 @TargetApi(Build.VERSION_CODES.N_MR1) |
2005 private void reportNewTabShortcutUsed(boolean isIncognito) { | 2010 private void reportNewTabShortcutUsed(boolean isIncognito) { |
2006 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N_MR1) return; | 2011 if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N_MR1) return; |
2007 | 2012 |
2008 ShortcutManager shortcutManager = getSystemService(ShortcutManager.class
); | 2013 ShortcutManager shortcutManager = getSystemService(ShortcutManager.class
); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2040 if (info.id == sMergedInstanceTaskId) return true; | 2045 if (info.id == sMergedInstanceTaskId) return true; |
2041 } | 2046 } |
2042 return false; | 2047 return false; |
2043 } | 2048 } |
2044 | 2049 |
2045 @Override | 2050 @Override |
2046 public boolean supportsFullscreenActivity() { | 2051 public boolean supportsFullscreenActivity() { |
2047 return true; | 2052 return true; |
2048 } | 2053 } |
2049 } | 2054 } |
OLD | NEW |