0

athena: Set a default background for the window title.

The window title/background is currently set only when the activity is
updated after the window is created. But if the activity is already
loaded by the time it is added, or if the activity is never loaded (e.g.
because of unavailable network), then the activity is never updates,
and consequently athena ends up showing a transparent window title. So
set the title once upon creation.

BUG=398937
R=oshima@chromium.org

Review URL: https://codereview.chromium.org/433083003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287074 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
sadrul@chromium.org
2014-08-01 19:52:31 +00:00
parent b0b91c06bc
commit 07ee26143f
2 changed files with 3 additions and 2 deletions

@ -30,6 +30,7 @@ ActivityFrameView::ActivityFrameView(views::Widget* frame,
title_->SetFontList(font_list.Derive(1, gfx::Font::BOLD));
title_->SetEnabledColor(SK_ColorBLACK);
AddChildView(title_);
UpdateWindowTitle();
}
ActivityFrameView::~ActivityFrameView() {

@ -349,11 +349,11 @@ void WebActivity::Init() {
SkColor WebActivity::GetRepresentativeColor() const {
// TODO(sad): Compute the color from the favicon.
return SK_ColorGRAY;
return web_view_ ? SK_ColorGRAY : SkColorSetRGB(0xbb, 0x77, 0x77);
}
base::string16 WebActivity::GetTitle() const {
return web_view_->GetWebContents()->GetTitle();
return web_view_ ? web_view_->GetWebContents()->GetTitle() : base::string16();
}
bool WebActivity::UsesFrame() const {