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

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

Issue 2873843002: Support autopresenting WebVr content. (Closed)
Patch Set: address more review comments Created 3 years, 7 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
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.SearchManager; 10 import android.app.SearchManager;
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698