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

Unified Diff: athena/test/sample_activity_factory.cc

Issue 596493002: Add actiivity in factory (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
« no previous file with comments | « athena/main/url_search_provider.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/test/sample_activity_factory.cc
diff --git a/athena/test/sample_activity_factory.cc b/athena/test/sample_activity_factory.cc
index d7444ebc40e44fe995ac10e96b4637e7ca6b0351..87bef8c042a1a64dd15dd9604d6d3e1754ea2f9b 100644
--- a/athena/test/sample_activity_factory.cc
+++ b/athena/test/sample_activity_factory.cc
@@ -6,6 +6,7 @@
#include <string>
+#include "athena/activity/public/activity_manager.h"
#include "athena/test/sample_activity.h"
#include "base/logging.h"
#include "base/strings/utf_string_conversions.h"
@@ -31,16 +32,20 @@ Activity* SampleActivityFactory::CreateWebActivity(
content::BrowserContext* browser_context,
const base::string16& title,
const GURL& url) {
- return new SampleActivity(
+ Activity* activity = new SampleActivity(
kDefaultColor, kDefaultContentColor, base::UTF8ToUTF16(url.spec()));
+ ActivityManager::Get()->AddActivity(activity);
+ return activity;
}
Activity* SampleActivityFactory::CreateAppActivity(
extensions::AppWindow* app_window,
views::WebView* web_view) {
DCHECK(!web_view);
- return new SampleActivity(
+ Activity* activity = new SampleActivity(
kDefaultAppColor, kDefaultAppContentColor, base::UTF8ToUTF16("App"));
+ ActivityManager::Get()->AddActivity(activity);
+ return activity;
}
} // namespace test
« no previous file with comments | « athena/main/url_search_provider.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698