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

Unified Diff: ui/native_theme/common_theme.cc

Issue 1797053002: Move theme part drawing functions only used on Windows to NativeThemeWin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compile Created 4 years, 9 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 | « ui/native_theme/common_theme.h ('k') | ui/native_theme/native_theme_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/native_theme/common_theme.cc
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
index 50dba800b87ff4840377132389951c9632db42eb..3f4c4ce82a451d9841540754017d8cd214dd6fca 100644
--- a/ui/native_theme/common_theme.cc
+++ b/ui/native_theme/common_theme.cc
@@ -437,30 +437,8 @@ void CommonThemePaintComboboxArrow(SkCanvas* canvas, const gfx::Rect& rect) {
CommonThemeCreateCanvas(canvas)->DrawImageInt(*arrow, rect.x(), rect.y());
}
-void CommonThemePaintMenuSeparator(SkCanvas* canvas, const gfx::Rect& rect) {
- SkPaint paint;
- paint.setColor(
- GetAuraColor(NativeTheme::kColorId_MenuSeparatorColor, nullptr));
- int position_y = rect.y() + rect.height() / 2;
- canvas->drawLine(rect.x(), position_y, rect.right(), position_y, paint);
-}
-
-void CommonThemePaintMenuGutter(SkCanvas* canvas, const gfx::Rect& rect) {
- SkPaint paint;
- paint.setColor(
- GetAuraColor(NativeTheme::kColorId_MenuSeparatorColor, nullptr));
- int position_x = rect.x() + rect.width() / 2;
- canvas->drawLine(position_x, rect.y(), position_x, rect.bottom(), paint);
-}
-
-void CommonThemePaintMenuBackground(SkCanvas* canvas, const gfx::Rect& rect) {
- SkPaint paint;
- paint.setColor(
- GetAuraColor(NativeTheme::kColorId_MenuBackgroundColor, nullptr));
- canvas->drawRect(gfx::RectToSkRect(rect), paint);
-}
-
void CommonThemePaintMenuItemBackground(
+ const NativeTheme* theme,
SkCanvas* canvas,
NativeTheme::State state,
const gfx::Rect& rect,
@@ -470,11 +448,11 @@ void CommonThemePaintMenuItemBackground(
case NativeTheme::kNormal:
case NativeTheme::kDisabled:
paint.setColor(
- GetAuraColor(NativeTheme::kColorId_MenuBackgroundColor, nullptr));
+ theme->GetSystemColor(NativeTheme::kColorId_MenuBackgroundColor));
break;
case NativeTheme::kHovered:
- paint.setColor(GetAuraColor(
- NativeTheme::kColorId_FocusedMenuItemBackgroundColor, nullptr));
+ paint.setColor(theme->GetSystemColor(
+ NativeTheme::kColorId_FocusedMenuItemBackgroundColor));
break;
default:
NOTREACHED() << "Invalid state " << state;
« no previous file with comments | « ui/native_theme/common_theme.h ('k') | ui/native_theme/native_theme_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698