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