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

Unified Diff: chrome/browser/ui/views/location_bar/ev_bubble_view.cc

Issue 1448433004: [MD] update EV bubble icon and location bar https icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix build.gn Created 5 years, 1 month 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/ui/views/location_bar/ev_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/ev_bubble_view.cc b/chrome/browser/ui/views/location_bar/ev_bubble_view.cc
index 32a5a3dc6ce670816fecf970ef154f4524dc79e3..a8c2f3ab15573b2eba14e03a5a259c559515e5a1 100644
--- a/chrome/browser/ui/views/location_bar/ev_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/ev_bubble_view.cc
@@ -5,6 +5,8 @@
#include "chrome/browser/ui/views/location_bar/ev_bubble_view.h"
#include "grit/theme_resources.h"
#include "ui/base/resource/material_design/material_design_controller.h"
+#include "ui/gfx/paint_vector_icon.h"
+#include "ui/gfx/vector_icons_public.h"
#include "ui/views/controls/label.h"
#include "ui/views/painter.h"
@@ -12,7 +14,9 @@ EVBubbleView::EVBubbleView(const gfx::FontList& font_list,
SkColor text_color,
SkColor parent_background_color,
LocationBarView* location_bar)
- : IconLabelBubbleView(IDR_OMNIBOX_HTTPS_VALID,
+ : IconLabelBubbleView(ui::MaterialDesignController::IsModeMaterial()
+ ? 0
+ : IDR_OMNIBOX_HTTPS_VALID,
font_list,
text_color,
parent_background_color,
@@ -57,6 +61,16 @@ void EVBubbleView::OnGestureEvent(ui::GestureEvent* event) {
}
}
+void EVBubbleView::OnNativeThemeChanged(const ui::NativeTheme* native_theme) {
+ if (ui::MaterialDesignController::IsModeMaterial()) {
+ SetImage(gfx::CreateVectorIcon(
+ gfx::VectorIconId::LOCATION_BAR_HTTPS_VALID_IN_CHIP, 16,
+ GetTextColor()));
+ }
+
+ IconLabelBubbleView::OnNativeThemeChanged(native_theme);
+}
+
gfx::Size EVBubbleView::GetMinimumSizeForLabelText(
const base::string16& text) const {
views::Label label(text, font_list());
« no previous file with comments | « chrome/browser/ui/views/location_bar/ev_bubble_view.h ('k') | chrome/browser/ui/views/location_bar/icon_label_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698