Chromium Code Reviews| 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.SearchManager; | 10 import android.app.SearchManager; |
| (...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 734 * @return Whether contextual search is allowed for this activity or not. | 734 * @return Whether contextual search is allowed for this activity or not. |
| 735 */ | 735 */ |
| 736 protected boolean isContextualSearchAllowed() { | 736 protected boolean isContextualSearchAllowed() { |
| 737 return true; | 737 return true; |
| 738 } | 738 } |
| 739 | 739 |
| 740 @Override | 740 @Override |
| 741 public void initializeState() { | 741 public void initializeState() { |
| 742 super.initializeState(); | 742 super.initializeState(); |
| 743 | 743 |
| 744 if (getSavedInstanceState() == null && getIntent() != null) { | |
| 745 // We send this intent so that we can enter WebVr presentation mode if needed. | |
|
mthiesse
2017/05/11 17:29:15
Add comment on why you don't mark the intent as ha
Ted C
2017/05/11 18:10:38
The problem is ChromeTabbedActivity creates the ta
ymalik
2017/05/11 21:17:52
Ah I see. Okay moved it to processUrlViewIntent. T
| |
| 746 VrShellDelegate.onNewIntent(this, getIntent()); | |
| 747 } | |
| 748 | |
| 744 IntentHandler.setTestIntentsEnabled( | 749 IntentHandler.setTestIntentsEnabled( |
| 745 CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TEST_ INTENTS)); | 750 CommandLine.getInstance().hasSwitch(ContentSwitches.ENABLE_TEST_ INTENTS)); |
| 746 mIntentHandler = new IntentHandler(createIntentHandlerDelegate(), getPac kageName()); | 751 mIntentHandler = new IntentHandler(createIntentHandlerDelegate(), getPac kageName()); |
| 747 } | 752 } |
| 748 | 753 |
| 749 @Override | 754 @Override |
| 750 public void initializeCompositor() { | 755 public void initializeCompositor() { |
| 751 TraceEvent.begin("ChromeActivity:CompositorInitialization"); | 756 TraceEvent.begin("ChromeActivity:CompositorInitialization"); |
| 752 super.initializeCompositor(); | 757 super.initializeCompositor(); |
| 753 | 758 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 909 } | 914 } |
| 910 | 915 |
| 911 @Override | 916 @Override |
| 912 public void onNewIntentWithNative(Intent intent) { | 917 public void onNewIntentWithNative(Intent intent) { |
| 913 VideoPersister.getInstance().cleanup(this); | 918 VideoPersister.getInstance().cleanup(this); |
| 914 | 919 |
| 915 super.onNewIntentWithNative(intent); | 920 super.onNewIntentWithNative(intent); |
| 916 if (mIntentHandler.shouldIgnoreIntent(intent)) return; | 921 if (mIntentHandler.shouldIgnoreIntent(intent)) return; |
| 917 | 922 |
| 918 mIntentHandler.onNewIntent(intent); | 923 mIntentHandler.onNewIntent(intent); |
| 924 VrShellDelegate.onNewIntent(this, intent); | |
| 919 } | 925 } |
| 920 | 926 |
| 921 /** | 927 /** |
| 922 * @return Whether the given activity contains a CustomTab. | 928 * @return Whether the given activity contains a CustomTab. |
| 923 */ | 929 */ |
| 924 public boolean isCustomTab() { | 930 public boolean isCustomTab() { |
| 925 return false; | 931 return false; |
| 926 } | 932 } |
| 927 | 933 |
| 928 /** | 934 /** |
| (...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2197 public void onExitVr() {} | 2203 public void onExitVr() {} |
| 2198 | 2204 |
| 2199 /** | 2205 /** |
| 2200 * Whether this Activity supports moving a {@link Tab} to the | 2206 * Whether this Activity supports moving a {@link Tab} to the |
| 2201 * {@link FullscreenWebContentsActivity} when it enters fullscreen. | 2207 * {@link FullscreenWebContentsActivity} when it enters fullscreen. |
| 2202 */ | 2208 */ |
| 2203 public boolean supportsFullscreenActivity() { | 2209 public boolean supportsFullscreenActivity() { |
| 2204 return false; | 2210 return false; |
| 2205 } | 2211 } |
| 2206 } | 2212 } |
| OLD | NEW |