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

Unified Diff: athena/activity/public/activity_manager.h

Issue 707603002: athena: Use ActivityList where appropriate, and fix AppActivity tests. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 1 month 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/activity/public/DEPS ('k') | athena/content/app_activity.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/activity/public/activity_manager.h
diff --git a/athena/activity/public/activity_manager.h b/athena/activity/public/activity_manager.h
index 3453fa96cb72e236bfe63db984bbafe44011d44c..9c6bff97381c75304ee556e866645b0930967e24 100644
--- a/athena/activity/public/activity_manager.h
+++ b/athena/activity/public/activity_manager.h
@@ -7,7 +7,9 @@
#include <vector>
+#include "athena/activity/public/activity.h"
#include "athena/athena_export.h"
+#include "base/memory/scoped_ptr.h"
namespace aura {
class Window;
@@ -18,7 +20,14 @@ namespace athena {
class Activity;
class ActivityManagerObserver;
+struct ActivityDeleter {
+ inline void operator()(Activity* activity) const {
+ Activity::Delete(activity);
+ }
+};
+
using ActivityList = std::vector<Activity*>;
+using ScopedActivity = scoped_ptr<Activity, ActivityDeleter>;
// Manages a set of activities.
class ATHENA_EXPORT ActivityManager {
@@ -33,6 +42,9 @@ class ATHENA_EXPORT ActivityManager {
virtual void AddActivity(Activity* activity) = 0;
virtual void RemoveActivity(Activity* activity) = 0;
+ virtual ScopedActivity ReplaceActivity(Activity* to_replace,
+ Activity* replace_with) = 0;
+
// Returns a list of activities, sorted in their activation order (the most
// recently used activity is at the front of the returned list).
virtual const ActivityList& GetActivityList() = 0;
« no previous file with comments | « athena/activity/public/DEPS ('k') | athena/content/app_activity.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698