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

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

Issue 2969923002: [vr] Hide 2D UI when entering VR for WebVR auto-presentation (Closed)
Patch Set: address mthiesse's review comments Created 3 years, 5 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/ChromeTabbedActivity.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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 mFullscreenManager = createFullscreenManager(); 324 mFullscreenManager = createFullscreenManager();
325 mCreatedFullscreenManager = true; 325 mCreatedFullscreenManager = true;
326 } 326 }
327 327
328 @SuppressLint("NewApi") 328 @SuppressLint("NewApi")
329 @Override 329 @Override
330 public void postInflationStartup() { 330 public void postInflationStartup() {
331 super.postInflationStartup(); 331 super.postInflationStartup();
332 332
333 Intent intent = getIntent();
334 if (intent != null && getSavedInstanceState() == null) {
335 VrShellDelegate.maybeHandleVrIntentPreNative(this, intent);
336 }
337
333 mSnackbarManager = new SnackbarManager(this, null); 338 mSnackbarManager = new SnackbarManager(this, null);
334 mDataUseSnackbarController = new DataUseSnackbarController(this, getSnac kbarManager()); 339 mDataUseSnackbarController = new DataUseSnackbarController(this, getSnac kbarManager());
335 340
336 mAssistStatusHandler = createAssistStatusHandler(); 341 mAssistStatusHandler = createAssistStatusHandler();
337 if (mAssistStatusHandler != null) { 342 if (mAssistStatusHandler != null) {
338 if (mTabModelSelector != null) { 343 if (mTabModelSelector != null) {
339 mAssistStatusHandler.setTabModelSelector(mTabModelSelector); 344 mAssistStatusHandler.setTabModelSelector(mTabModelSelector);
340 } 345 }
341 mAssistStatusHandler.updateAssistState(); 346 mAssistStatusHandler.updateAssistState();
342 } 347 }
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 if (syncService != null) { 912 if (syncService != null) {
908 syncService.removeSyncStateChangedListener(mSyncStateChanged Listener); 913 syncService.removeSyncStateChangedListener(mSyncStateChanged Listener);
909 } 914 }
910 mSyncStateChangedListener = null; 915 mSyncStateChangedListener = null;
911 } 916 }
912 } 917 }
913 super.onStopWithNative(); 918 super.onStopWithNative();
914 } 919 }
915 920
916 @Override 921 @Override
922 protected void onNewIntent(Intent intent) {
923 super.onNewIntent(intent);
924 VrShellDelegate.maybeHandleVrIntentPreNative(this, intent);
925 }
926
927 @Override
917 public void onNewIntentWithNative(Intent intent) { 928 public void onNewIntentWithNative(Intent intent) {
918 mPictureInPictureController.cleanup(this); 929 mPictureInPictureController.cleanup(this);
919 930
920 super.onNewIntentWithNative(intent); 931 super.onNewIntentWithNative(intent);
921 if (mIntentHandler.shouldIgnoreIntent(intent)) return; 932 if (mIntentHandler.shouldIgnoreIntent(intent)) return;
922 933
934 // We send this intent so that we can enter WebVr presentation mode if n eeded. This
935 // call doesn't consume the intent because it also has the url that we n eed to load.
936 VrShellDelegate.onNewIntentWithNative(this, intent);
923 mIntentHandler.onNewIntent(intent); 937 mIntentHandler.onNewIntent(intent);
924 } 938 }
925 939
926 /** 940 /**
927 * @return Whether the given activity contains a CustomTab. 941 * @return Whether the given activity contains a CustomTab.
928 */ 942 */
929 public boolean isCustomTab() { 943 public boolean isCustomTab() {
930 return false; 944 return false;
931 } 945 }
932 946
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 mRemoveWindowBackgroundDone = true; 1222 mRemoveWindowBackgroundDone = true;
1209 } 1223 }
1210 1224
1211 @Override 1225 @Override
1212 public void finishNativeInitialization() { 1226 public void finishNativeInitialization() {
1213 mNativeInitialized = true; 1227 mNativeInitialized = true;
1214 OfflineContentAggregatorNotificationBridgeUiFactory.instance(); 1228 OfflineContentAggregatorNotificationBridgeUiFactory.instance();
1215 maybeRemoveWindowBackground(); 1229 maybeRemoveWindowBackground();
1216 DownloadManagerService.getDownloadManagerService().onActivityLaunched(); 1230 DownloadManagerService.getDownloadManagerService().onActivityLaunched();
1217 1231
1218 VrShellDelegate.onNativeLibraryAvailable(); 1232 Intent intent = getSavedInstanceState() == null ? getIntent() : null;
1233 VrShellDelegate.onNativeLibraryAvailable(this, intent);
Ted C 2017/07/14 00:12:05 I'd recommend not passing the intent in this call,
ymalik 2017/07/14 05:27:43 Thanks, Done.
1219 super.finishNativeInitialization(); 1234 super.finishNativeInitialization();
1220 } 1235 }
1221 1236
1222 /** 1237 /**
1223 * Called when the accessibility status of this device changes. This might be triggered by 1238 * Called when the accessibility status of this device changes. This might be triggered by
1224 * touch exploration or general accessibility status updates. It is an aggr egate of two other 1239 * touch exploration or general accessibility status updates. It is an aggr egate of two other
1225 * accessibility update methods. 1240 * accessibility update methods.
1226 * @see #onAccessibilityModeChanged(boolean) 1241 * @see #onAccessibilityModeChanged(boolean)
1227 * @see #onTouchExplorationStateChanged(boolean) 1242 * @see #onTouchExplorationStateChanged(boolean)
1228 * @param enabled Whether or not accessibility and touch exploration are cur rently enabled. 1243 * @param enabled Whether or not accessibility and touch exploration are cur rently enabled.
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 return false; 2249 return false;
2235 } 2250 }
2236 2251
2237 /** 2252 /**
2238 * @return the reference pool for this activity. 2253 * @return the reference pool for this activity.
2239 */ 2254 */
2240 public DiscardableReferencePool getReferencePool() { 2255 public DiscardableReferencePool getReferencePool() {
2241 return mReferencePool; 2256 return mReferencePool;
2242 } 2257 }
2243 } 2258 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698