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

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

Issue 1423263004: [MD] Use programmatic rendering for omnibox chips (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: self review 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 1e4312d1f1b7e6ca0ffc3eb8b9e4f80c15f7d990..da489695c3321c6b4d0bac45b2f7c720540ccefb 100644
--- a/chrome/browser/ui/views/location_bar/ev_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/ev_bubble_view.cc
@@ -17,13 +17,9 @@ EVBubbleView::EVBubbleView(const gfx::FontList& font_list,
text_color,
parent_background_color,
true),
+ text_color_(text_color),
page_info_helper_(this, location_bar) {
- if (ui::MaterialDesignController::IsModeMaterial()) {
- // The insets for IDR_OMNIBOX_EV_BUBBLE for which to perfom nine-slicing.
- static const int kImageInset = 4;
- gfx::Insets insets(kImageInset, kImageInset, kImageInset, kImageInset);
- SetBackgroundImageWithInsets(IDR_OMNIBOX_EV_BUBBLE, insets);
- } else {
+ if (!ui::MaterialDesignController::IsModeMaterial()) {
static const int kBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE);
SetBackgroundImageGrid(kBackgroundImages);
}
@@ -53,6 +49,14 @@ void EVBubbleView::OnGestureEvent(ui::GestureEvent* event) {
}
}
+SkColor EVBubbleView::GetTextColor() const {
+ return text_color_;
+}
+
+SkColor EVBubbleView::GetBorderColor() const {
+ return GetTextColor();
+}
+
gfx::Size EVBubbleView::GetMinimumSizeForLabelText(
const base::string16& text) const {
views::Label label(text, font_list());

Powered by Google App Engine
This is Rietveld 408576698