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

Unified Diff: athena/content/web_activity.cc

Issue 544813002: Support V1 app (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
Index: athena/content/web_activity.cc
diff --git a/athena/content/web_activity.cc b/athena/content/web_activity.cc
index 2d58a7246de404acfb14c297f765e78d0344dab0..e7b50645284dbb1623963df88f787c28ac45450e 100644
--- a/athena/content/web_activity.cc
+++ b/athena/content/web_activity.cc
@@ -222,8 +222,8 @@ class AthenaWebView : public views::WebView {
case NEW_POPUP:
case NEW_WINDOW: {
ActivityManager::Get()->AddActivity(
- ActivityFactory::Get()->CreateWebActivity(browser_context(),
- params.url));
+ ActivityFactory::Get()->CreateWebActivity(
+ browser_context(), base::string16(), params.url));
break;
}
default:
@@ -325,8 +325,10 @@ class AthenaWebView : public views::WebView {
};
WebActivity::WebActivity(content::BrowserContext* browser_context,
+ const base::string16& title,
const GURL& url)
: browser_context_(browser_context),
+ title_(title),
url_(url),
web_view_(NULL),
title_color_(kDefaultTitleColor),
@@ -430,6 +432,8 @@ SkColor WebActivity::GetRepresentativeColor() const {
}
base::string16 WebActivity::GetTitle() const {
+ if (!title_.empty())
+ return title_;
return web_view_ ? base::UTF8ToUTF16(
web_view_->GetWebContents()->GetVisibleURL().host())
: base::string16();

Powered by Google App Engine
This is Rietveld 408576698