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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 public void onNewIntentWithNative(Intent intent) { | 559 public void onNewIntentWithNative(Intent intent) { |
560 try { | 560 try { |
561 TraceEvent.begin("ChromeTabbedActivity.onNewIntentWithNative"); | 561 TraceEvent.begin("ChromeTabbedActivity.onNewIntentWithNative"); |
562 | 562 |
563 super.onNewIntentWithNative(intent); | 563 super.onNewIntentWithNative(intent); |
564 if (CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TEST_
INTENTS)) { | 564 if (CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TEST_
INTENTS)) { |
565 handleDebugIntent(intent); | 565 handleDebugIntent(intent); |
566 } | 566 } |
567 if (mVrShellDelegate.isDaydreamVrIntent(intent)) { | 567 if (mVrShellDelegate.isDaydreamVrIntent(intent)) { |
568 mVrShellDelegate.enterVRFromIntent(intent); | 568 mVrShellDelegate.enterVRFromIntent(intent); |
| 569 } else if (ShortcutHelper.isShowToastIntent(intent)) { |
| 570 ShortcutHelper.showAddedToHomescreenToastFromIntent(intent); |
569 } | 571 } |
570 } finally { | 572 } finally { |
571 TraceEvent.end("ChromeTabbedActivity.onNewIntentWithNative"); | 573 TraceEvent.end("ChromeTabbedActivity.onNewIntentWithNative"); |
572 } | 574 } |
573 } | 575 } |
574 | 576 |
575 @Override | 577 @Override |
576 public ChromeTabCreator getTabCreator(boolean incognito) { | 578 public ChromeTabCreator getTabCreator(boolean incognito) { |
577 TabCreator tabCreator = super.getTabCreator(incognito); | 579 TabCreator tabCreator = super.getTabCreator(incognito); |
578 assert tabCreator instanceof ChromeTabCreator; | 580 assert tabCreator instanceof ChromeTabCreator; |
(...skipping 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1841 | 1843 |
1842 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT
IVITY_SERVICE); | 1844 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT
IVITY_SERVICE); |
1843 for (AppTask task : manager.getAppTasks()) { | 1845 for (AppTask task : manager.getAppTasks()) { |
1844 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task); | 1846 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task); |
1845 if (info == null) continue; | 1847 if (info == null) continue; |
1846 if (info.id == sMergedInstanceTaskId) return true; | 1848 if (info.id == sMergedInstanceTaskId) return true; |
1847 } | 1849 } |
1848 return false; | 1850 return false; |
1849 } | 1851 } |
1850 } | 1852 } |
OLD | NEW |