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

Unified Diff: chrome/browser/ui/libgtkui/native_theme_gtk2.cc

Issue 2697663002: Clean up naming of paint-related identifiers (Closed)
Patch Set: Rebase Created 3 years, 10 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/libgtkui/native_theme_gtk2.cc
diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk2.cc b/chrome/browser/ui/libgtkui/native_theme_gtk2.cc
index 6e7583c4fce249651903acfe461d64ff47458377..78880f097a6a2934b2b62abe0fbfed3550b81c02 100644
--- a/chrome/browser/ui/libgtkui/native_theme_gtk2.cc
+++ b/chrome/browser/ui/libgtkui/native_theme_gtk2.cc
@@ -75,10 +75,10 @@ void NativeThemeGtk2::PaintMenuPopupBackground(
const gfx::Size& size,
const MenuBackgroundExtraParams& menu_background) const {
if (menu_background.corner_radius > 0) {
- cc::PaintFlags paint;
- paint.setStyle(cc::PaintFlags::kFill_Style);
- paint.setFlags(cc::PaintFlags::kAntiAlias_Flag);
- paint.setColor(GetSystemColor(kColorId_MenuBackgroundColor));
+ cc::PaintFlags flags;
+ flags.setStyle(cc::PaintFlags::kFill_Style);
+ flags.setFlags(cc::PaintFlags::kAntiAlias_Flag);
+ flags.setColor(GetSystemColor(kColorId_MenuBackgroundColor));
gfx::Path path;
SkRect rect = SkRect::MakeWH(SkIntToScalar(size.width()),
@@ -88,7 +88,7 @@ void NativeThemeGtk2::PaintMenuPopupBackground(
radius, radius, radius, radius};
path.addRoundRect(rect, radii);
- canvas->drawPath(path, paint);
+ canvas->drawPath(path, flags);
} else {
canvas->drawColor(GetSystemColor(kColorId_MenuBackgroundColor),
SkBlendMode::kSrc);
@@ -101,17 +101,17 @@ void NativeThemeGtk2::PaintMenuItemBackground(
const gfx::Rect& rect,
const MenuItemExtraParams& menu_item) const {
SkColor color;
- cc::PaintFlags paint;
+ cc::PaintFlags flags;
switch (state) {
case NativeTheme::kNormal:
case NativeTheme::kDisabled:
color = GetSystemColor(NativeTheme::kColorId_MenuBackgroundColor);
- paint.setColor(color);
+ flags.setColor(color);
break;
case NativeTheme::kHovered:
color =
GetSystemColor(NativeTheme::kColorId_FocusedMenuItemBackgroundColor);
- paint.setColor(color);
+ flags.setColor(color);
break;
default:
NOTREACHED() << "Invalid state " << state;
@@ -119,10 +119,10 @@ void NativeThemeGtk2::PaintMenuItemBackground(
}
if (menu_item.corner_radius > 0) {
const SkScalar radius = SkIntToScalar(menu_item.corner_radius);
- canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, paint);
+ canvas->drawRoundRect(gfx::RectToSkRect(rect), radius, radius, flags);
return;
}
- canvas->drawRect(gfx::RectToSkRect(rect), paint);
+ canvas->drawRect(gfx::RectToSkRect(rect), flags);
}
SkColor NativeThemeGtk2::GetSystemColor(ColorId color_id) const {

Powered by Google App Engine
This is Rietveld 408576698