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

Unified Diff: chrome/browser/ui/views/toolbar/app_menu.cc

Issue 2382443007: Clean up NativeTheme (particularly CommonTheme). (Closed)
Patch Set: tdandersonreview 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/toolbar/app_menu.cc
diff --git a/chrome/browser/ui/views/toolbar/app_menu.cc b/chrome/browser/ui/views/toolbar/app_menu.cc
index 26839ed476a25d322e51562a9eacdf3091f22452..047ba7d57054257f119e4ab1a0e5c0ea1a2bab29 100644
--- a/chrome/browser/ui/views/toolbar/app_menu.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu.cc
@@ -195,14 +195,12 @@ class InMenuButtonBackground : public views::Background {
views::Button::ButtonState state) {
const ui::NativeTheme* theme = view->GetNativeTheme();
switch (state) {
- case views::Button::STATE_HOVERED:
- // Hovered should be handled in DrawBackground.
- NOTREACHED();
- return theme->GetSystemColor(
- ui::NativeTheme::kColorId_HoverMenuItemBackgroundColor);
case views::Button::STATE_PRESSED:
return theme->GetSystemColor(
ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor);
+ case views::Button::STATE_HOVERED:
+ // Hovered should be handled in DrawBackground.
+ NOTREACHED();
default:
return theme->GetSystemColor(
ui::NativeTheme::kColorId_MenuBackgroundColor);
@@ -732,12 +730,6 @@ class AppMenu::RecentTabsMenuModelDelegate : public ui::MenuModelDelegate {
return model_->GetLabelFontListAt(index);
}
- bool GetShouldUseDisabledEmphasizedForegroundColor(int index) const {
- // The items for which we get a font list, should be shown in the bolded
- // color.
- return GetLabelFontListAt(index) ? true : false;
- }
-
// ui::MenuModelDelegate implementation:
void OnIconChanged(int index) override {
@@ -863,14 +855,8 @@ const gfx::FontList* AppMenu::GetLabelFontList(int command_id) const {
return NULL;
}
-bool AppMenu::GetShouldUseDisabledEmphasizedForegroundColor(
- int command_id) const {
- if (IsRecentTabsCommand(command_id)) {
- return recent_tabs_menu_model_delegate_->
- GetShouldUseDisabledEmphasizedForegroundColor(
- ModelIndexFromCommandId(command_id));
- }
- return false;
+bool AppMenu::GetShouldUseNormalForegroundColor(int command_id) const {
+ return IsRecentTabsCommand(command_id);
}
base::string16 AppMenu::GetTooltipText(int command_id,

Powered by Google App Engine
This is Rietveld 408576698