| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #include "chrome/browser/android/vr_shell/vr_web_contents_observer.h" | 5 #include "chrome/browser/android/vr_shell/vr_web_contents_observer.h" |
| 6 | 6 |
| 7 #include "chrome/browser/android/vr_shell/ui_interface.h" | 7 #include "chrome/browser/android/vr_shell/ui_interface.h" |
| 8 #include "chrome/browser/android/vr_shell/vr_shell.h" | 8 #include "chrome/browser/android/vr_shell/vr_shell.h" |
| 9 #include "chrome/browser/ssl/security_state_tab_helper.h" | 9 #include "chrome/browser/ssl/security_state_tab_helper.h" |
| 10 #include "components/security_state/core/security_state.h" | 10 #include "components/security_state/core/security_state.h" |
| 11 #include "content/public/browser/navigation_handle.h" | 11 #include "content/public/browser/navigation_handle.h" |
| 12 #include "content/public/browser/render_view_host.h" |
| 13 #include "content/public/browser/render_widget_host.h" |
| 14 #include "content/public/browser/render_widget_host_view.h" |
| 12 | 15 |
| 13 namespace vr_shell { | 16 namespace vr_shell { |
| 14 | 17 |
| 15 VrWebContentsObserver::VrWebContentsObserver(content::WebContents* web_contents, | 18 VrWebContentsObserver::VrWebContentsObserver(content::WebContents* web_contents, |
| 16 UiInterface* ui_interface, | 19 UiInterface* ui_interface, |
| 17 VrShell* vr_shell) | 20 VrShell* vr_shell) |
| 18 : WebContentsObserver(web_contents), | 21 : WebContentsObserver(web_contents), |
| 19 ui_interface_(ui_interface), | 22 ui_interface_(ui_interface), |
| 20 vr_shell_(vr_shell) { | 23 vr_shell_(vr_shell) { |
| 21 ui_interface_->SetURL(web_contents->GetVisibleURL()); | 24 ui_interface_->SetURL(web_contents->GetVisibleURL()); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 } | 77 } |
| 75 | 78 |
| 76 void VrWebContentsObserver::WebContentsDestroyed() { | 79 void VrWebContentsObserver::WebContentsDestroyed() { |
| 77 vr_shell_->ContentWebContentsDestroyedOnUI(); | 80 vr_shell_->ContentWebContentsDestroyedOnUI(); |
| 78 } | 81 } |
| 79 | 82 |
| 80 void VrWebContentsObserver::WasHidden() { | 83 void VrWebContentsObserver::WasHidden() { |
| 81 vr_shell_->ContentWasHiddenOnUI(); | 84 vr_shell_->ContentWasHiddenOnUI(); |
| 82 } | 85 } |
| 83 | 86 |
| 87 void VrWebContentsObserver::RenderViewHostChanged( |
| 88 content::RenderViewHost* old_host, |
| 89 content::RenderViewHost* new_host) { |
| 90 new_host->GetWidget()->GetView()->SetShowingOverscrollGlow(false); |
| 91 } |
| 92 |
| 84 } // namespace vr_shell | 93 } // namespace vr_shell |
| OLD | NEW |