Commit b0a5a0ba authored by minch's avatar minch Committed by Commit Bot

Use GetNativeTheme in ExtensionsMenuView.

Bug: 977430
Change-Id: I62fbc664bbaf2489152b5817fa7162845c815e81
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1737160Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Min Chen <minch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#684174}
parent 7818fadd
...@@ -30,15 +30,6 @@ ExtensionsMenuView* g_extensions_dialog = nullptr; ...@@ -30,15 +30,6 @@ ExtensionsMenuView* g_extensions_dialog = nullptr;
constexpr int EXTENSIONS_SETTINGS_ID = 42; constexpr int EXTENSIONS_SETTINGS_ID = 42;
// TODO(minch): This function should be a class function of ExtensionsMenuView,
// then View::GetNativeTheme can be used to get the icon color.
gfx::ImageSkia CreateVectorIcon(const gfx::VectorIcon& icon) {
return gfx::CreateVectorIcon(
icon, 16,
ui::NativeTheme::GetInstanceForNativeUi()->GetSystemColor(
ui::NativeTheme::kColorId_DefaultIconColor));
}
} // namespace } // namespace
ExtensionsMenuView::ExtensionsMenuView( ExtensionsMenuView::ExtensionsMenuView(
...@@ -104,7 +95,10 @@ void ExtensionsMenuView::Repopulate() { ...@@ -104,7 +95,10 @@ void ExtensionsMenuView::Repopulate() {
AddChildView(std::make_unique<views::Separator>()); AddChildView(std::make_unique<views::Separator>());
auto icon_view = CreateFixedSizeIconView(); auto icon_view = CreateFixedSizeIconView();
icon_view->SetImage(CreateVectorIcon(vector_icons::kSettingsIcon)); icon_view->SetImage(
gfx::CreateVectorIcon(vector_icons::kSettingsIcon, 16,
GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_DefaultIconColor)));
auto footer = std::make_unique<HoverButton>( auto footer = std::make_unique<HoverButton>(
this, std::move(icon_view), this, std::move(icon_view),
l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSION), base::string16()); l10n_util::GetStringUTF16(IDS_MANAGE_EXTENSION), base::string16());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment