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

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

Issue 2382443007: Clean up NativeTheme (particularly CommonTheme). (Closed)
Patch Set: share color constant Created 4 years, 2 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
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.h ('k') | chrome/browser/ui/views/toolbar/toolbar_action_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c68cb760ab9ea1ea2d28cacae2cdb3eb40d70cf1..45f98c66509ebbbe1f8fb17240aa95807a8a1e34 100644
--- a/chrome/browser/ui/views/toolbar/app_menu.cc
+++ b/chrome/browser/ui/views/toolbar/app_menu.cc
@@ -194,14 +194,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);
@@ -731,12 +729,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 {
@@ -862,14 +854,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,
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.h ('k') | chrome/browser/ui/views/toolbar/toolbar_action_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698