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

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

Issue 2348853004: Remove non-md code in location bar (Views). (Closed)
Patch Set: images Created 4 years, 3 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
Index: chrome/browser/ui/views/location_bar/location_icon_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_icon_view.cc b/chrome/browser/ui/views/location_bar/location_icon_view.cc
index 8ed384c4a148cbbcfb75b1c5b3141fb075c7febd..172718e5fdb028b72cf4d14efcb5bbcdb7c35853 100644
--- a/chrome/browser/ui/views/location_bar/location_icon_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_icon_view.cc
@@ -17,7 +17,6 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/material_design/material_design_controller.h"
#include "ui/gfx/color_palette.h"
#include "ui/views/controls/label.h"
#include "ui/views/painter.h"
@@ -26,12 +25,8 @@ using content::NavigationEntry;
using content::WebContents;
LocationIconView::LocationIconView(const gfx::FontList& font_list,
- SkColor parent_background_color,
LocationBarView* location_bar)
- : IconLabelBubbleView(IDR_OMNIBOX_HTTPS_INVALID,
- font_list,
- parent_background_color,
- true),
+ : IconLabelBubbleView(font_list, true),
suppress_mouse_released_action_(false),
location_bar_(location_bar),
animation_(this) {
@@ -43,7 +38,6 @@ LocationIconView::LocationIconView(const gfx::FontList& font_list,
SetFocusBehavior(FocusBehavior::ALWAYS);
#endif
- SetBackground(false);
animation_.SetSlideDuration(kOpenTimeMS);
}
@@ -105,6 +99,7 @@ bool LocationIconView::GetTooltipText(const gfx::Point& p,
}
SkColor LocationIconView::GetTextColor() const {
+ NOTIMPLEMENTED() << " HITTING THIS";
Peter Kasting 2016/09/19 23:46:46 Um. Should we ever reach here? Maybe the right t
Evan Stade 2016/09/20 17:37:04 oops yes we need this function still. We don't ne
return location_bar_->GetColor(LocationBarView::SECURITY_CHIP_TEXT);
}
@@ -139,14 +134,6 @@ gfx::Size LocationIconView::GetMinimumSizeForLabelText(
GetSizeForLabelWidth(label.GetPreferredSize().width()));
}
-void LocationIconView::SetBackground(bool should_show_ev) {
- static const int kEvBackgroundImages[] = IMAGE_GRID(IDR_OMNIBOX_EV_BUBBLE);
- if (should_show_ev)
- SetBackgroundImageGrid(kEvBackgroundImages);
- else
- UnsetBackgroundImageGrid();
-}
-
void LocationIconView::SetSecurityState(bool should_show, bool should_animate) {
if (!should_animate) {
animation_.Reset(should_show);
@@ -155,6 +142,8 @@ void LocationIconView::SetSecurityState(bool should_show, bool should_animate) {
} else {
animation_.Hide();
}
+ // The label text color may have changed.
+ OnNativeThemeChanged(GetNativeTheme());
Peter Kasting 2016/09/19 23:46:46 Is this a bugfix?
Evan Stade 2016/09/20 17:37:04 no. It worked before because this line was in SetB
}
double LocationIconView::WidthMultiplier() const {

Powered by Google App Engine
This is Rietveld 408576698