Index: chrome/browser/ui/views/location_bar/location_bar_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
index 17dfec364cb218ce8b138dc11ea58e2a3410e41c..a37de8a5213311b147b0baffddc3d5117ff634b2 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
@@ -23,6 +23,7 @@ |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/search_engines/template_url_service_factory.h" |
#include "chrome/browser/themes/theme_properties.h" |
+#include "chrome/browser/themes/theme_service.h" |
#include "chrome/browser/translate/chrome_translate_client.h" |
#include "chrome/browser/translate/translate_service.h" |
#include "chrome/browser/ui/autofill/save_card_bubble_controller_impl.h" |
@@ -102,13 +103,6 @@ |
using content::WebContents; |
using views::View; |
-namespace { |
- |
-// The border color, drawn on top of the toolbar. |
-const SkColor kBorderColor = SkColorSetA(SK_ColorBLACK, 0x4D); |
- |
-} // namespace |
- |
// LocationBarView ----------------------------------------------------------- |
@@ -159,13 +153,6 @@ LocationBarView::~LocationBarView() { |
//////////////////////////////////////////////////////////////////////////////// |
// LocationBarView, public: |
-// static |
-SkColor LocationBarView::GetOpaqueBorderColor(bool incognito) { |
- return color_utils::GetResultingPaintColor( |
- kBorderColor, ThemeProperties::GetDefaultColor( |
- ThemeProperties::COLOR_TOOLBAR, incognito)); |
-} |
- |
void LocationBarView::Init() { |
// We need to be in a Widget, otherwise GetNativeTheme() may change and we're |
// not prepared for that. |
@@ -304,6 +291,12 @@ SkColor LocationBarView::GetColor( |
return gfx::kPlaceholderColor; |
} |
+SkColor LocationBarView::GetOpaqueBorderColor(bool incognito) { |
Peter Kasting
2017/02/11 10:18:46
Should be const
|
+ return color_utils::GetResultingPaintColor( |
+ GetBorderColor(), ThemeProperties::GetDefaultColor( |
+ ThemeProperties::COLOR_TOOLBAR, incognito)); |
+} |
+ |
SkColor LocationBarView::GetSecureTextColor( |
security_state::SecurityLevel security_level) const { |
if (security_level == security_state::SECURE_WITH_POLICY_INSTALLED_CERT) { |
@@ -614,7 +607,7 @@ void LocationBarView::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
// This border color will be blended on top of the toolbar (which may use an |
// image in the case of themes). |
set_background( |
- new BackgroundWith1PxBorder(GetColor(BACKGROUND), kBorderColor)); |
+ new BackgroundWith1PxBorder(GetColor(BACKGROUND), GetBorderColor())); |
} |
SchedulePaint(); |
} |
@@ -669,6 +662,11 @@ int LocationBarView::IncrementalMinimumWidth(views::View* view) const { |
: 0; |
} |
+SkColor LocationBarView::GetBorderColor() { |
Peter Kasting
2017/02/11 10:18:46
Should be const
|
+ return GetThemeProvider()->GetColor( |
+ ThemeProperties::COLOR_LOCATION_BAR_BORDER); |
+} |
+ |
int LocationBarView::GetHorizontalEdgeThickness() const { |
return is_popup_mode_ |
? 0 |