| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/textures/url_bar_texture.h" | 5 #include "chrome/browser/android/vr_shell/textures/url_bar_texture.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "cc/paint/skia_paint_canvas.h" | 8 #include "cc/paint/skia_paint_canvas.h" |
| 9 #include "components/security_state/core/security_state.h" | 9 #include "components/security_state/core/security_state.h" |
| 10 #include "ui/gfx/canvas.h" | 10 #include "ui/gfx/canvas.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 using security_state::SecurityLevel; | 40 using security_state::SecurityLevel; |
| 41 | 41 |
| 42 const struct gfx::VectorIcon& getSecurityIcon(int level) { | 42 const struct gfx::VectorIcon& getSecurityIcon(int level) { |
| 43 switch (level) { | 43 switch (level) { |
| 44 case SecurityLevel::NONE: | 44 case SecurityLevel::NONE: |
| 45 case SecurityLevel::HTTP_SHOW_WARNING: | 45 case SecurityLevel::HTTP_SHOW_WARNING: |
| 46 case SecurityLevel::SECURITY_WARNING: | 46 case SecurityLevel::SECURITY_WARNING: |
| 47 return ui::kInfoOutlineIcon; | 47 return ui::kInfoOutlineIcon; |
| 48 case SecurityLevel::SECURE: | 48 case SecurityLevel::SECURE: |
| 49 case SecurityLevel::EV_SECURE: | 49 case SecurityLevel::EV_SECURE: |
| 50 // TODO(cjgrant): Use the lock icon when available. | 50 return ui::kLockIcon; |
| 51 // return ui::kLockIcon; | |
| 52 return ui::kInfoOutlineIcon; | |
| 53 case SecurityLevel::SECURE_WITH_POLICY_INSTALLED_CERT: | 51 case SecurityLevel::SECURE_WITH_POLICY_INSTALLED_CERT: |
| 54 case SecurityLevel::DANGEROUS: | 52 case SecurityLevel::DANGEROUS: |
| 55 default: | 53 default: |
| 56 return ui::kWarningIcon; | 54 return ui::kWarningIcon; |
| 57 } | 55 } |
| 58 } | 56 } |
| 59 | 57 |
| 60 } // namespace | 58 } // namespace |
| 61 | 59 |
| 62 UrlBarTexture::UrlBarTexture() : security_level_(SecurityLevel::DANGEROUS) {} | 60 UrlBarTexture::UrlBarTexture() : security_level_(SecurityLevel::DANGEROUS) {} |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 152 |
| 155 gfx::Size UrlBarTexture::GetPreferredTextureSize(int maximum_width) const { | 153 gfx::Size UrlBarTexture::GetPreferredTextureSize(int maximum_width) const { |
| 156 return gfx::Size(maximum_width, maximum_width * kHeight / kWidth); | 154 return gfx::Size(maximum_width, maximum_width * kHeight / kWidth); |
| 157 } | 155 } |
| 158 | 156 |
| 159 gfx::SizeF UrlBarTexture::GetDrawnSize() const { | 157 gfx::SizeF UrlBarTexture::GetDrawnSize() const { |
| 160 return size_; | 158 return size_; |
| 161 } | 159 } |
| 162 | 160 |
| 163 } // namespace vr_shell | 161 } // namespace vr_shell |
| OLD | NEW |