summaryrefslogtreecommitdiffstats
path: root/athena
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 19:52:31 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-01 19:52:31 +0000
commit07ee26143f2e01f488412746a5b715fc9e8fd863 (patch)
tree7063f2c28886acf171d4e09d1d629a24d069acad /athena
parentb0b91c06bc2ed6afc0611f00d68f72b19dd06d26 (diff)
downloadchromium_src-07ee26143f2e01f488412746a5b715fc9e8fd863.zip
chromium_src-07ee26143f2e01f488412746a5b715fc9e8fd863.tar.gz
chromium_src-07ee26143f2e01f488412746a5b715fc9e8fd863.tar.bz2
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
Diffstat (limited to 'athena')
-rw-r--r--athena/activity/activity_frame_view.cc1
-rw-r--r--athena/content/web_activity.cc4
2 files changed, 3 insertions, 2 deletions
diff --git a/athena/activity/activity_frame_view.cc b/athena/activity/activity_frame_view.cc
index 0b0e64f..dac8499 100644
--- a/athena/activity/activity_frame_view.cc
+++ b/athena/activity/activity_frame_view.cc
@@ -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() {
diff --git a/athena/content/web_activity.cc b/athena/content/web_activity.cc
index 8ec8b53..0a5e0b5 100644
--- a/athena/content/web_activity.cc
+++ b/athena/content/web_activity.cc
@@ -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 {