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

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

Issue 2562503002: Generalize WebContentsObserver::SecurityStyleChanged (Closed)
Patch Set: Created 4 years 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
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 48cddbc3589634ce09e4c94f98e1bf7177da2cdd..89943666faf8dbfa3d7e55e49a2e9f60e841b4e1 100644
--- a/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
+++ b/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
@@ -19,7 +19,7 @@ VrWebContentsObserver::VrWebContentsObserver(content::WebContents* web_contents,
ui_interface_(ui_interface),
vr_shell_(vr_shell) {
ui_interface_->SetURL(web_contents->GetVisibleURL());
- SetSecurityLevel();
+ DidChangeVisibleSecurityState();
}
VrWebContentsObserver::~VrWebContentsObserver() {}
@@ -40,7 +40,6 @@ void VrWebContentsObserver::DidStartNavigation(
content::NavigationHandle* navigation_handle) {
if (navigation_handle->IsInMainFrame()) {
ui_interface_->SetURL(navigation_handle->GetURL());
- SetSecurityLevel();
}
}
@@ -48,7 +47,6 @@ void VrWebContentsObserver::DidRedirectNavigation(
content::NavigationHandle* navigation_handle) {
if (navigation_handle->IsInMainFrame()) {
ui_interface_->SetURL(navigation_handle->GetURL());
- SetSecurityLevel();
}
}
@@ -56,11 +54,10 @@ void VrWebContentsObserver::DidFinishNavigation(
content::NavigationHandle* navigation_handle) {
if (navigation_handle->IsInMainFrame()) {
ui_interface_->SetURL(navigation_handle->GetURL());
- SetSecurityLevel();
}
}
-void VrWebContentsObserver::SetSecurityLevel() {
+void VrWebContentsObserver::DidChangeVisibleSecurityState() {
const auto* helper = SecurityStateTabHelper::FromWebContents(web_contents());
DCHECK(helper);
security_state::SecurityInfo security_info;

Powered by Google App Engine
This is Rietveld 408576698