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

Unified Diff: chrome/browser/android/vr_shell/vr_web_contents_observer.cc

Issue 2536873002: Clean up VR Shell mode transitions (and fix potential webvr startup race). (Closed)
Patch Set: Address comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | chrome/browser/resources/vr_shell/vr_shell_ui.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/vr_web_contents_observer.cc
diff --git a/chrome/browser/android/vr_shell/vr_web_contents_observer.cc b/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
index 4b337eb261a914e200a973509edb330a7095f619..84165bd3865c8728f691ba705cce8e582f7dc693 100644
--- a/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
+++ b/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
@@ -46,13 +46,7 @@ void VrWebContentsObserver::DidFinishNavigation(
void VrWebContentsObserver::DidToggleFullscreenModeForTab(
bool entered_fullscreen, bool will_cause_resize) {
// TODO(amp): Use will_cause_resize to signal ui of pending size changes.
- int mode = ui_interface_->GetMode();
- if (entered_fullscreen && mode == UiInterface::Mode::STANDARD) {
- ui_interface_->SetMode(UiInterface::Mode::CINEMA);
- }
- if (!entered_fullscreen && mode == UiInterface::Mode::CINEMA) {
- ui_interface_->SetMode(UiInterface::Mode::STANDARD);
- }
+ ui_interface_->SetCinemaMode(entered_fullscreen);
}
} // namespace vr_shell
« no previous file with comments | « chrome/browser/android/vr_shell/vr_shell.cc ('k') | chrome/browser/resources/vr_shell/vr_shell_ui.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698