| Index: chrome/browser/android/vr_shell/vr_shell.cc
|
| diff --git a/chrome/browser/android/vr_shell/vr_shell.cc b/chrome/browser/android/vr_shell/vr_shell.cc
|
| index aa18f3a2518afd75f833e3531995b5aa9b60502a..a408900c313805b5cd37a2063fcdef70d74014ad 100644
|
| --- a/chrome/browser/android/vr_shell/vr_shell.cc
|
| +++ b/chrome/browser/android/vr_shell/vr_shell.cc
|
| @@ -170,7 +170,8 @@ VrShell::VrShell(JNIEnv* env,
|
| if (for_web_vr)
|
| metrics_helper_->SetWebVREnabled(true);
|
| html_interface_.reset(new UiInterface(
|
| - for_web_vr ? UiInterface::Mode::WEB_VR : UiInterface::Mode::STANDARD));
|
| + for_web_vr ? UiInterface::Mode::WEB_VR : UiInterface::Mode::STANDARD,
|
| + main_contents_->IsFullscreen()));
|
| content_compositor_.reset(new VrCompositor(content_window, false));
|
| ui_compositor_.reset(new VrCompositor(ui_window, true));
|
| vr_web_contents_observer_.reset(
|
| @@ -966,7 +967,8 @@ void VrShell::SetWebVrMode(JNIEnv* env,
|
| }
|
|
|
| void VrShell::SetWebVRSecureOrigin(bool secure_origin) {
|
| - html_interface_->SetSecureOrigin(secure_origin);
|
| + // TODO(cjgrant): Align this state with the logic that drives the omnibox.
|
| + html_interface_->SetWebVRSecureOrigin(secure_origin);
|
| }
|
|
|
| void VrShell::SubmitWebVRFrame() {}
|
| @@ -1043,8 +1045,11 @@ void VrShell::DoUiAction(const UiAction action) {
|
| content::NavigationController& controller = main_contents_->GetController();
|
| switch (action) {
|
| case HISTORY_BACK:
|
| - if (controller.CanGoBack())
|
| + if (main_contents_->IsFullscreen()) {
|
| + main_contents_->ExitFullscreen(true /* will_cause_resize */);
|
| + } else if (controller.CanGoBack()) {
|
| controller.GoBack();
|
| + }
|
| break;
|
| case HISTORY_FORWARD:
|
| if (controller.CanGoForward())
|
| @@ -1056,7 +1061,8 @@ void VrShell::DoUiAction(const UiAction action) {
|
| #if defined(ENABLE_VR_SHELL_UI_DEV)
|
| case RELOAD_UI:
|
| ui_contents_->GetController().Reload(false);
|
| - html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD));
|
| + html_interface_.reset(new UiInterface(UiInterface::Mode::STANDARD,
|
| + main_contents_->IsFullscreen()));
|
| vr_web_contents_observer_->SetUiInterface(html_interface_.get());
|
| break;
|
| #endif
|
|
|