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

Unified Diff: ui/views/window/custom_frame_view.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/views/window/custom_frame_view.cc
diff --git a/ui/views/window/custom_frame_view.cc b/ui/views/window/custom_frame_view.cc
index bac98a4181af8df101cb57b90c406e25a584f47d..900daa81a6f535260b6c6e421c03a20240005d77 100644
--- a/ui/views/window/custom_frame_view.cc
+++ b/ui/views/window/custom_frame_view.cc
@@ -221,6 +221,13 @@ void CustomFrameView::OnPaint(gfx::Canvas* canvas) {
if (!ShouldShowTitleBarAndBorder())
return;
+ frame_background_->set_frame_color(GetFrameColor());
+ frame_background_->set_is_active(ShouldPaintAsActive());
+ frame_background_->set_incognito(false);
+ const gfx::ImageSkia frame_image = GetFrameImage();
+ frame_background_->set_theme_image(frame_image);
+ frame_background_->set_top_area_height(frame_image.height());
+
if (frame_->IsMaximized())
PaintMaximizedFrameBorder(canvas);
else
@@ -359,11 +366,6 @@ bool CustomFrameView::ShouldShowClientEdge() const {
}
void CustomFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
- frame_background_->set_frame_color(GetFrameColor());
- const gfx::ImageSkia frame_image = GetFrameImage();
- frame_background_->set_theme_image(frame_image);
- frame_background_->set_top_area_height(frame_image.height());
-
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
frame_background_->SetCornerImages(
@@ -381,9 +383,6 @@ void CustomFrameView::PaintRestoredFrameBorder(gfx::Canvas* canvas) {
}
void CustomFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) {
- const gfx::ImageSkia frame_image = GetFrameImage();
- frame_background_->set_theme_image(frame_image);
- frame_background_->set_top_area_height(frame_image.height());
frame_background_->PaintMaximized(canvas, this);
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();

Powered by Google App Engine
This is Rietveld 408576698