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

Unified Diff: chrome/browser/android/vr_shell/ui_elements/url_bar.cc

Issue 2946523002: VR: Support security chip text on URL bar. (Closed)
Patch Set: Address comments. Created 3 years, 6 months 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/ui_elements/url_bar.cc
diff --git a/chrome/browser/android/vr_shell/ui_elements/url_bar.cc b/chrome/browser/android/vr_shell/ui_elements/url_bar.cc
index 52bcbfb07356fd5182ba4076bb553ee35ba8c976..3ad755b4701087f547456b03465d12756e9acf39 100644
--- a/chrome/browser/android/vr_shell/ui_elements/url_bar.cc
+++ b/chrome/browser/android/vr_shell/ui_elements/url_bar.cc
@@ -55,8 +55,8 @@ void UrlBar::OnMove(const gfx::PointF& position) {
void UrlBar::OnButtonDown(const gfx::PointF& position) {
if (texture_->HitsBackButton(position))
down_ = true;
- else if (texture_->HitsSecurityIcon(position))
- security_icon_down_ = true;
+ else if (texture_->HitsSecurityRegion(position))
+ security_region_down_ = true;
OnStateUpdated(position);
}
@@ -65,9 +65,9 @@ void UrlBar::OnButtonUp(const gfx::PointF& position) {
OnStateUpdated(position);
if (can_go_back_ && texture_->HitsBackButton(position))
back_button_callback_.Run();
- else if (security_icon_down_ && texture_->HitsSecurityIcon(position))
+ else if (security_region_down_ && texture_->HitsSecurityRegion(position))
security_icon_callback_.Run();
- security_icon_down_ = false;
+ security_region_down_ = false;
}
bool UrlBar::HitTest(const gfx::PointF& position) const {
@@ -97,8 +97,9 @@ void UrlBar::SetHistoryButtonsEnabled(bool can_go_back) {
texture_->SetHistoryButtonsEnabled(can_go_back_);
}
-void UrlBar::SetSecurityLevel(security_state::SecurityLevel level) {
- texture_->SetSecurityLevel(level);
+void UrlBar::SetSecurityInfo(security_state::SecurityLevel level,
+ bool malware) {
+ texture_->SetSecurityInfo(level, malware);
}
void UrlBar::OnStateUpdated(const gfx::PointF& position) {

Powered by Google App Engine
This is Rietveld 408576698