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

Unified Diff: chrome/browser/android/vr_shell/textures/url_bar_texture.cc

Issue 2923843002: Use desktop toolbar icons in VR. (Closed)
Patch Set: 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
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/vr_shell/textures/url_bar_texture.cc
diff --git a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
index b47429b79ab32d76b9ebe5b23018fd3a1be5ca9f..5ad3fc2c29481aa199b8f8c0cb1c04e874755630 100644
--- a/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
+++ b/chrome/browser/android/vr_shell/textures/url_bar_texture.cc
@@ -8,6 +8,7 @@
#include "cc/paint/skia_paint_canvas.h"
#include "chrome/browser/android/vr_shell/color_scheme.h"
#include "chrome/browser/android/vr_shell/textures/render_text_wrapper.h"
+#include "components/toolbar/vector_icons.h"
#include "components/url_formatter/url_formatter.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/font.h"
@@ -37,21 +38,25 @@ static constexpr float kSeparatorWidth = 0.002;
using security_state::SecurityLevel;
+// See ToolbarModelImpl::GetVectorIcon().
const struct gfx::VectorIcon& getSecurityIcon(SecurityLevel level) {
switch (level) {
- case SecurityLevel::NONE:
- case SecurityLevel::HTTP_SHOW_WARNING:
- case SecurityLevel::SECURITY_WARNING:
- return ui::kInfoOutlineIcon;
- case SecurityLevel::SECURE:
- case SecurityLevel::EV_SECURE:
- return ui::kLockIcon;
- case SecurityLevel::DANGEROUS:
- return ui::kWarningIcon;
- case SecurityLevel::SECURE_WITH_POLICY_INSTALLED_CERT: // ChromeOS only.
+ case security_state::NONE:
+ case security_state::HTTP_SHOW_WARNING:
+ return toolbar::kHttpIcon;
+ case security_state::EV_SECURE:
+ case security_state::SECURE:
+ return toolbar::kHttpsValidIcon;
+ case security_state::SECURITY_WARNING:
+ // Surface Dubious as Neutral.
+ return toolbar::kHttpIcon;
+ case security_state::SECURE_WITH_POLICY_INSTALLED_CERT: // ChromeOS only.
+ return ui::kBusinessIcon;
+ case security_state::DANGEROUS:
+ return toolbar::kHttpsInvalidIcon;
default:
NOTREACHED();
- return ui::kWarningIcon;
+ return toolbar::kHttpsInvalidIcon;
}
}
@@ -60,17 +65,19 @@ SkColor getSchemeColor(SecurityLevel level, const ColorScheme& color_scheme) {
switch (level) {
case SecurityLevel::NONE:
case SecurityLevel::HTTP_SHOW_WARNING:
- case SecurityLevel::SECURITY_WARNING:
return color_scheme.deemphasized;
- case SecurityLevel::SECURE:
case SecurityLevel::EV_SECURE:
+ case SecurityLevel::SECURE:
return color_scheme.secure;
+ case SecurityLevel::SECURITY_WARNING:
+ return color_scheme.deemphasized;
+ case SecurityLevel::SECURE_WITH_POLICY_INSTALLED_CERT: // ChromeOS only.
+ return color_scheme.insecure;
case SecurityLevel::DANGEROUS:
return color_scheme.insecure;
- case SecurityLevel::SECURE_WITH_POLICY_INSTALLED_CERT: // ChromeOS only.
default:
NOTREACHED();
- return color_scheme.warning;
+ return color_scheme.insecure;
}
}
« no previous file with comments | « chrome/browser/android/vr_shell/BUILD.gn ('k') | chrome/browser/ui/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698