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

Unified Diff: athena/content/web_activity.cc

Issue 455773003: athena: Show the theme-color in the title strip, and fix the height. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 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 | « athena/content/web_activity.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/content/web_activity.cc
diff --git a/athena/content/web_activity.cc b/athena/content/web_activity.cc
index 0a5e0b5a1140ed5f33bfa0d77328fd9146cecbda..da1cfd55f9b777db3b372e14fa3f245214179891 100644
--- a/athena/content/web_activity.cc
+++ b/athena/content/web_activity.cc
@@ -120,6 +120,9 @@ class WebActivityController : public AcceleratorHandler {
DISALLOW_COPY_AND_ASSIGN(WebActivityController);
};
+const SkColor kDefaultTitleColor = SK_ColorGRAY;
+const SkColor kDefaultUnavailableColor = SkColorSetRGB(0xbb, 0x77, 0x77);
+
} // namespace
// A web view for athena's web activity. Note that AthenaWebView will create its
@@ -261,6 +264,7 @@ WebActivity::WebActivity(content::BrowserContext* browser_context,
: browser_context_(browser_context),
url_(url),
web_view_(NULL),
+ title_color_(kDefaultTitleColor),
current_state_(ACTIVITY_UNLOADED) {
}
@@ -349,7 +353,7 @@ void WebActivity::Init() {
SkColor WebActivity::GetRepresentativeColor() const {
// TODO(sad): Compute the color from the favicon.
- return web_view_ ? SK_ColorGRAY : SkColorSetRGB(0xbb, 0x77, 0x77);
+ return web_view_ ? title_color_ : kDefaultUnavailableColor;
}
base::string16 WebActivity::GetTitle() const {
@@ -389,4 +393,8 @@ void WebActivity::DidUpdateFaviconURL(
ActivityManager::Get()->UpdateActivity(this);
}
+void WebActivity::DidChangeThemeColor(SkColor theme_color) {
+ title_color_ = theme_color;
+}
+
} // namespace athena
« no previous file with comments | « athena/content/web_activity.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698