Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1125)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java

Issue 2603793002: Fix incognito notification/cleanup for android multiwindow. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 TabLaunchType launchType; 845 TabLaunchType launchType;
846 if (fromLauncherShortcut) { 846 if (fromLauncherShortcut) {
847 getTabCreator(true).launchUrl( 847 getTabCreator(true).launchUrl(
848 UrlConstants.NTP_URL, TabLaunchType.FROM_EXT ERNAL_APP); 848 UrlConstants.NTP_URL, TabLaunchType.FROM_EXT ERNAL_APP);
849 recordLauncherShortcutAction(true); 849 recordLauncherShortcutAction(true);
850 reportNewTabShortcutUsed(true); 850 reportNewTabShortcutUsed(true);
851 } else if (TextUtils.equals(externalAppId, getPackageNam e())) { 851 } else if (TextUtils.equals(externalAppId, getPackageNam e())) {
852 // Used by the Account management screen to open a n ew incognito tab. 852 // Used by the Account management screen to open a n ew incognito tab.
853 // Account management screen collects its metrics se parately. 853 // Account management screen collects its metrics se parately.
854 getTabCreator(true).launchUrl( 854 getTabCreator(true).launchUrl(
855 UrlConstants.NTP_URL, TabLaunchType.FROM_CHR OME_UI); 855 UrlConstants.NTP_URL, TabLaunchType.FROM_CHR OME_UI,
856 intent, mIntentHandlingTimeMs);
856 } else { 857 } else {
857 getTabCreator(true).launchUrl( 858 getTabCreator(true).launchUrl(
858 UrlConstants.NTP_URL, TabLaunchType.FROM_EXT ERNAL_APP); 859 UrlConstants.NTP_URL, TabLaunchType.FROM_EXT ERNAL_APP,
860 intent, mIntentHandlingTimeMs);
859 RecordUserAction.record("MobileReceivedExternalInten t"); 861 RecordUserAction.record("MobileReceivedExternalInten t");
860 } 862 }
861 } else { 863 } else {
862 if (TextUtils.equals(externalAppId, getPackageName())) { 864 if (TextUtils.equals(externalAppId, getPackageName())) {
863 getTabCreator(true).launchUrl( 865 getTabCreator(true).launchUrl(
864 url, TabLaunchType.FROM_LINK, intent, mInten tHandlingTimeMs); 866 url, TabLaunchType.FROM_LINK, intent, mInten tHandlingTimeMs);
865 } else { 867 } else {
866 getTabCreator(true).launchUrlFromExternalApp(url, re ferer, headers, 868 getTabCreator(true).launchUrlFromExternalApp(url, re ferer, headers,
867 externalAppId, true, intent, mIntentHandling TimeMs); 869 externalAppId, true, intent, mIntentHandling TimeMs);
868 RecordUserAction.record("MobileReceivedExternalInten t"); 870 RecordUserAction.record("MobileReceivedExternalInten t");
(...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 1711
1710 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT IVITY_SERVICE); 1712 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT IVITY_SERVICE);
1711 for (AppTask task : manager.getAppTasks()) { 1713 for (AppTask task : manager.getAppTasks()) {
1712 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task); 1714 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task);
1713 if (info == null) continue; 1715 if (info == null) continue;
1714 if (info.id == sMergedInstanceTaskId) return true; 1716 if (info.id == sMergedInstanceTaskId) return true;
1715 } 1717 }
1716 return false; 1718 return false;
1717 } 1719 }
1718 } 1720 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698