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

Unified Diff: ash/frame/default_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: rebase 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
« no previous file with comments | « ash/frame/default_header_painter.h ('k') | ash/frame/header_painter_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/frame/default_header_painter.cc
diff --git a/ash/frame/default_header_painter.cc b/ash/frame/default_header_painter.cc
index 80e2f533eea9c41589ad80e381d7da2c98b83e03..946126fea6888823824b26632881cab45cdc011b 100644
--- a/ash/frame/default_header_painter.cc
+++ b/ash/frame/default_header_painter.cc
@@ -75,6 +75,7 @@ DefaultHeaderPainter::DefaultHeaderPainter()
: frame_(NULL),
view_(NULL),
window_icon_(NULL),
+ window_icon_size_(HeaderPainterUtil::GetDefaultIconSize()),
caption_button_container_(NULL),
height_(0),
mode_(MODE_INACTIVE),
@@ -215,11 +216,11 @@ void DefaultHeaderPainter::LayoutHeader() {
if (window_icon_) {
// Vertically center the window icon with respect to the caption button
// container.
- int icon_size = HeaderPainterUtil::GetIconSize();
// Floor when computing the center of |caption_button_container_|.
- int icon_offset_y = caption_button_container_->height() / 2 - icon_size / 2;
+ int icon_offset_y =
+ caption_button_container_->height() / 2 - window_icon_size_ / 2;
window_icon_->SetBounds(HeaderPainterUtil::GetIconXOffset(), icon_offset_y,
- icon_size, icon_size);
+ window_icon_size_, window_icon_size_);
}
// The header/content separator line overlays the caption buttons.
@@ -238,6 +239,12 @@ void DefaultHeaderPainter::SchedulePaintForTitle() {
view_->SchedulePaintInRect(GetTitleBounds());
}
+void DefaultHeaderPainter::UpdateWindowIcon(views::View* window_icon,
+ int window_icon_size) {
+ window_icon_ = window_icon;
+ window_icon_size_ = window_icon_size;
+}
+
///////////////////////////////////////////////////////////////////////////////
// gfx::AnimationDelegate overrides:
« no previous file with comments | « ash/frame/default_header_painter.h ('k') | ash/frame/header_painter_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698