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()); |
} |
} |