| 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 1689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1700 // 4. Ask TabPersistentStore to merge state. | 1700 // 4. Ask TabPersistentStore to merge state. |
| 1701 RecordUserAction.record("Android.MergeState.Live"); | 1701 RecordUserAction.record("Android.MergeState.Live"); |
| 1702 mTabModelSelectorImpl.mergeState(); | 1702 mTabModelSelectorImpl.mergeState(); |
| 1703 | 1703 |
| 1704 setMergedInstanceTaskId(getTaskId()); | 1704 setMergedInstanceTaskId(getTaskId()); |
| 1705 } | 1705 } |
| 1706 | 1706 |
| 1707 // TODO(mthiesse): Toggle toolbar overlay, popups, etc. | 1707 // TODO(mthiesse): Toggle toolbar overlay, popups, etc. |
| 1708 public void setUIVisibilityForVR(int visibility) { | 1708 public void setUIVisibilityForVR(int visibility) { |
| 1709 mControlContainer.setVisibility(visibility); | 1709 mControlContainer.setVisibility(visibility); |
| 1710 getCompositorViewHolder().getSurfaceView().setVisibility(visibility); | 1710 getCompositorViewHolder().getCompositorView().setVisibility(visibility); |
| 1711 getCompositorViewHolder().setVisibility(visibility); | 1711 getCompositorViewHolder().setVisibility(visibility); |
| 1712 } | 1712 } |
| 1713 | 1713 |
| 1714 /** | 1714 /** |
| 1715 * Reports that a new tab launcher shortcut was selected or an action equiva
lent to a shortcut | 1715 * Reports that a new tab launcher shortcut was selected or an action equiva
lent to a shortcut |
| 1716 * was performed. | 1716 * was performed. |
| 1717 * @param isIncognito Whether the shortcut or action created a new incognito
tab. | 1717 * @param isIncognito Whether the shortcut or action created a new incognito
tab. |
| 1718 */ | 1718 */ |
| 1719 @TargetApi(25) | 1719 @TargetApi(25) |
| 1720 private void reportNewTabShortcutUsed(boolean isIncognito) { | 1720 private void reportNewTabShortcutUsed(boolean isIncognito) { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1759 | 1759 |
| 1760 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT
IVITY_SERVICE); | 1760 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT
IVITY_SERVICE); |
| 1761 for (AppTask task : manager.getAppTasks()) { | 1761 for (AppTask task : manager.getAppTasks()) { |
| 1762 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task); | 1762 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task); |
| 1763 if (info == null) continue; | 1763 if (info == null) continue; |
| 1764 if (info.id == sMergedInstanceTaskId) return true; | 1764 if (info.id == sMergedInstanceTaskId) return true; |
| 1765 } | 1765 } |
| 1766 return false; | 1766 return false; |
| 1767 } | 1767 } |
| 1768 } | 1768 } |
| OLD | NEW |