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

Unified Diff: ash/frame/header_painter.cc

Issue 200483004: Show avatar icon on V2 app's frame (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: ash/frame/header_painter.cc
diff --git a/ash/frame/header_painter.cc b/ash/frame/header_painter.cc
index 6e18d95de6b28edd8fc1af0d26b47e7da9e6e209..d0acfdda21ddb667fe7a3aeefeb6e844ecc13eb0 100644
--- a/ash/frame/header_painter.cc
+++ b/ash/frame/header_painter.cc
@@ -143,6 +143,7 @@ HeaderPainter::HeaderPainter()
: frame_(NULL),
header_view_(NULL),
window_icon_(NULL),
+ window_icon_size_(kIconSize, kIconSize),
caption_button_container_(NULL),
header_height_(0),
previous_theme_frame_id_(0),
@@ -170,6 +171,12 @@ void HeaderPainter::Init(
caption_button_container_ = caption_button_container;
}
+void HeaderPainter::UpdateWindowIcon(views::View* window_icon,
+ const gfx::Size& window_icon_size) {
+ window_icon_ = window_icon;
+ window_icon_size_ = window_icon_size;
+}
+
// static
gfx::Rect HeaderPainter::GetBoundsForClientView(
int header_height,
@@ -368,7 +375,9 @@ void HeaderPainter::LayoutHeader() {
// container.
int icon_offset_y =
GetCaptionButtonContainerCenterY() - window_icon_->height() / 2;
- window_icon_->SetBounds(kIconOffsetX, icon_offset_y, kIconSize, kIconSize);
+ window_icon_->SetBounds(kIconOffsetX, icon_offset_y,
+ window_icon_size_.width(),
+ window_icon_size_.height());
}
}

Powered by Google App Engine
This is Rietveld 408576698