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

Side by Side Diff: chrome/browser/android/vr_shell/textures/url_bar_texture.cc

Issue 2874783002: Move kLockIcon into ui/vector_icons. (Closed)
Patch Set: Add a dependency. Created 3 years, 7 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 unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/app/vector_icons/lock.icon ('k') | chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698