| 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 3cd8d383df4ac186e88d645b003a6a2af814e738..f66f61d4c1aa1e95565548baf2f8a482997205ee 100644
|
| --- a/chrome/browser/android/vr_shell/vr_shell.cc
|
| +++ b/chrome/browser/android/vr_shell/vr_shell.cc
|
| @@ -15,6 +15,7 @@
|
| #include "chrome/browser/android/vr_shell/vr_input_manager.h"
|
| #include "chrome/browser/android/vr_shell/vr_shell_delegate.h"
|
| #include "chrome/browser/android/vr_shell/vr_shell_renderer.h"
|
| +#include "chrome/browser/android/vr_shell/vr_web_contents_observer.h"
|
| #include "content/public/browser/navigation_controller.h"
|
| #include "content/public/browser/render_widget_host.h"
|
| #include "content/public/browser/render_widget_host_view.h"
|
| @@ -125,6 +126,8 @@ VrShell::VrShell(JNIEnv* env, jobject obj,
|
| html_interface_.reset(new UiInterface);
|
| content_compositor_.reset(new VrCompositor(content_window, false));
|
| ui_compositor_.reset(new VrCompositor(ui_window, true));
|
| + vr_web_contents_observer_.reset(
|
| + new VrWebContentsObserver(main_contents, html_interface_.get()));
|
|
|
| LoadUIContent();
|
|
|
| @@ -678,6 +681,8 @@ void VrShell::OnDomContentsLoaded() {
|
| // should fix.
|
| ui_contents_->GetRenderWidgetHostView()->SetBackgroundColor(
|
| SK_ColorTRANSPARENT);
|
| + html_interface_->SetURL(main_contents_->GetVisibleURL());
|
| + html_interface_->SetLoading(main_contents_->IsLoading());
|
| html_interface_->OnDomContentsLoaded();
|
| }
|
|
|
| @@ -784,6 +789,7 @@ void VrShell::DoUiAction(const UiAction action) {
|
| ui_contents_->GetController().Reload(false);
|
| html_interface_.reset(new UiInterface);
|
| html_interface_->SetMode(UiInterface::Mode::STANDARD);
|
| + vr_web_contents_observer_->SetUiInterface(html_interface_.get());
|
| break;
|
| #endif
|
| case ZOOM_OUT: // Not handled yet.
|
|
|