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

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

Issue 2556963006: Wire the VR omnibox directly to visible security state changes. (Closed)
Patch Set: Rebase onto 2524423002 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
« no previous file with comments | « chrome/browser/android/vr_shell/vr_web_contents_observer.h ('k') | no next file » | 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 da533a9f0be0f41361c031f8f5db988bb5bc72d8..a21580a6d6070fde398c14ed4faddeda8b26d82c 100644
--- a/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
+++ b/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
@@ -43,7 +43,6 @@ void VrWebContentsObserver::DidStartNavigation(
content::NavigationHandle* navigation_handle) {
if (navigation_handle->IsInMainFrame()) {
ui_interface_->SetURL(navigation_handle->GetURL());
- SetSecurityLevel();
}
}
@@ -51,7 +50,6 @@ void VrWebContentsObserver::DidRedirectNavigation(
content::NavigationHandle* navigation_handle) {
if (navigation_handle->IsInMainFrame()) {
ui_interface_->SetURL(navigation_handle->GetURL());
- SetSecurityLevel();
}
}
@@ -59,10 +57,18 @@ void VrWebContentsObserver::DidFinishNavigation(
content::NavigationHandle* navigation_handle) {
if (navigation_handle->IsInMainFrame()) {
ui_interface_->SetURL(navigation_handle->GetURL());
- SetSecurityLevel();
}
}
+// TODO(cjgrant): We care about security level, not style. Refactor
+// WebContentsObserver (or equivalent) to expose more general security
+// information, so we can stop abusing this callback.
+void VrWebContentsObserver::SecurityStyleChanged(
+ blink::WebSecurityStyle security_style,
+ const content::SecurityStyleExplanations& explanations) {
+ SetSecurityLevel();
+}
+
void VrWebContentsObserver::SetSecurityLevel() {
const auto* helper = SecurityStateTabHelper::FromWebContents(web_contents());
DCHECK(helper);
« no previous file with comments | « chrome/browser/android/vr_shell/vr_web_contents_observer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698