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

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

Issue 2510873003: Clean up WebVR RequestPresent and make callback asynchronous. (Closed)
Patch Set: Fix FakeVRDevice Created 4 years, 1 month 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.ActivityManager; 10 import android.app.ActivityManager;
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 // away in Recents. http://crbug.com/626629 646 // away in Recents. http://crbug.com/626629
647 boolean ignoreIncognitoFiles = !hadCipherData; 647 boolean ignoreIncognitoFiles = !hadCipherData;
648 mTabModelSelectorImpl.loadState(ignoreIncognitoFiles); 648 mTabModelSelectorImpl.loadState(ignoreIncognitoFiles);
649 } 649 }
650 650
651 mIntentWithEffect = false; 651 mIntentWithEffect = false;
652 if ((mIsOnFirstRun || getSavedInstanceState() == null) && intent != null) { 652 if ((mIsOnFirstRun || getSavedInstanceState() == null) && intent != null) {
653 if (mVrShellDelegate.isVrIntent(intent)) { 653 if (mVrShellDelegate.isVrIntent(intent)) {
654 // TODO(mthiesse): Improve startup when started from a VR in tent. Right now 654 // TODO(mthiesse): Improve startup when started from a VR in tent. Right now
655 // we launch out of VR, partially load out of VR, then switc h into VR. 655 // we launch out of VR, partially load out of VR, then switc h into VR.
656 mVrShellDelegate.enterVRIfNecessary(false); 656 mVrShellDelegate.enterVRIfNecessary();
657 } else if (!mIntentHandler.shouldIgnoreIntent(ChromeTabbedActivi ty.this, intent)) { 657 } else if (!mIntentHandler.shouldIgnoreIntent(ChromeTabbedActivi ty.this, intent)) {
658 mIntentWithEffect = mIntentHandler.onNewIntent(ChromeTabbedA ctivity.this, 658 mIntentWithEffect = mIntentHandler.onNewIntent(ChromeTabbedA ctivity.this,
659 intent); 659 intent);
660 } 660 }
661 } 661 }
662 662
663 mCreatedTabOnStartup = getCurrentTabModel().getCount() > 0 663 mCreatedTabOnStartup = getCurrentTabModel().getCount() > 0
664 || mTabModelSelectorImpl.getRestoredTabCount() > 0 664 || mTabModelSelectorImpl.getRestoredTabCount() > 0
665 || mIntentWithEffect; 665 || mIntentWithEffect;
666 666
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 getToolbarManager().setUrlBarFocus(true); 1192 getToolbarManager().setUrlBarFocus(true);
1193 } 1193 }
1194 } else if (id == R.id.downloads_menu_id) { 1194 } else if (id == R.id.downloads_menu_id) {
1195 DownloadUtils.showDownloadManager(this, currentTab); 1195 DownloadUtils.showDownloadManager(this, currentTab);
1196 RecordUserAction.record("MobileMenuDownloadManager"); 1196 RecordUserAction.record("MobileMenuDownloadManager");
1197 } else if (id == R.id.open_recently_closed_tab) { 1197 } else if (id == R.id.open_recently_closed_tab) {
1198 TabModel currentModel = mTabModelSelectorImpl.getCurrentModel(); 1198 TabModel currentModel = mTabModelSelectorImpl.getCurrentModel();
1199 if (!currentModel.isIncognito()) currentModel.openMostRecentlyClosed Tab(); 1199 if (!currentModel.isIncognito()) currentModel.openMostRecentlyClosed Tab();
1200 RecordUserAction.record("MobileTabClosedUndoShortCut"); 1200 RecordUserAction.record("MobileTabClosedUndoShortCut");
1201 } else if (id == R.id.enter_vr_id) { 1201 } else if (id == R.id.enter_vr_id) {
1202 mVrShellDelegate.enterVRIfNecessary(false); 1202 mVrShellDelegate.enterVRIfNecessary();
1203 } else { 1203 } else {
1204 return super.onMenuOrKeyboardAction(id, fromMenu); 1204 return super.onMenuOrKeyboardAction(id, fromMenu);
1205 } 1205 }
1206 return true; 1206 return true;
1207 } 1207 }
1208 1208
1209 private void recordBackPressedUma(String logMessage, @BackPressedResult int action) { 1209 private void recordBackPressedUma(String logMessage, @BackPressedResult int action) {
1210 Log.i(TAG, "Back pressed: " + logMessage); 1210 Log.i(TAG, "Back pressed: " + logMessage);
1211 RecordHistogram.recordEnumeratedHistogram( 1211 RecordHistogram.recordEnumeratedHistogram(
1212 "Android.Activity.ChromeTabbedActivity.SystemBackAction", 1212 "Android.Activity.ChromeTabbedActivity.SystemBackAction",
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
1709 1709
1710 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT IVITY_SERVICE); 1710 ActivityManager manager = (ActivityManager) getSystemService(Context.ACT IVITY_SERVICE);
1711 for (AppTask task : manager.getAppTasks()) { 1711 for (AppTask task : manager.getAppTasks()) {
1712 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task); 1712 RecentTaskInfo info = DocumentUtils.getTaskInfoFromTask(task);
1713 if (info == null) continue; 1713 if (info == null) continue;
1714 if (info.id == sMergedInstanceTaskId) return true; 1714 if (info.id == sMergedInstanceTaskId) return true;
1715 } 1715 }
1716 return false; 1716 return false;
1717 } 1717 }
1718 } 1718 }
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