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

Unified Diff: ui/native_theme/native_theme_base.cc

Issue 2628043002: Gtk3: Render a GtkHeaderBar as the background of the tab strip (Closed)
Patch Set: Handle incognito Created 3 years, 11 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: ui/native_theme/native_theme_base.cc
diff --git a/ui/native_theme/native_theme_base.cc b/ui/native_theme/native_theme_base.cc
index b9d2827db8961cd0c240bcf7c01f23fde6359027..ddf2128cbd446991458e4fe61cf35b84b6de1161 100644
--- a/ui/native_theme/native_theme_base.cc
+++ b/ui/native_theme/native_theme_base.cc
@@ -172,6 +172,9 @@ void NativeThemeBase::Paint(SkCanvas* canvas,
case kCheckbox:
PaintCheckbox(canvas, state, rect, extra.button);
break;
+ case kFrameTopArea:
+ PaintFrameTopArea(canvas, state, rect, extra.frame_top_area);
+ break;
case kInnerSpinButton:
PaintInnerSpinButton(canvas, state, rect, extra.inner_spin);
break;
@@ -898,6 +901,16 @@ void NativeThemeBase::PaintProgressBar(
canvas->drawRect(gfx::RectFToSkRect(border_rect), stroke_paint);
}
+void NativeThemeBase::PaintFrameTopArea(
+ SkCanvas* canvas,
+ State state,
+ const gfx::Rect& rect,
+ const FrameTopAreaExtraParams& frame_top_area) const {
+ SkPaint paint;
+ paint.setColor(frame_top_area.default_background_color);
+ canvas->drawRect(gfx::RectToSkRect(rect), paint);
+}
+
void NativeThemeBase::AdjustCheckboxRadioRectForPadding(SkRect* rect) const {
// By default we only take 1px from right and bottom for the drop shadow.
rect->iset(rect->x(), rect->y(), rect->right() - 1, rect->bottom() - 1);

Powered by Google App Engine
This is Rietveld 408576698