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

Unified Diff: athena/content/app_activity_proxy.h

Issue 536013002: Decoupling visibility states from webcontent, adding visibility management in ResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed 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/content/app_activity.cc ('k') | athena/content/app_activity_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/content/app_activity_proxy.h
diff --git a/athena/content/app_activity_proxy.h b/athena/content/app_activity_proxy.h
index 407beac2acbe5816c2503190d38be01bea842f9b..5685be670983b2da0156f39a69e0dcaaa03c6929 100644
--- a/athena/content/app_activity_proxy.h
+++ b/athena/content/app_activity_proxy.h
@@ -21,10 +21,15 @@ class AppActivityRegistry;
class AppActivityProxy : public Activity,
public ActivityViewModel {
public:
- AppActivityProxy(ActivityViewModel* view_model, AppActivityRegistry* creator);
+ // The |replaced_activity| is the activity which this proxy replaces. Note
+ // that after the Init() call got called, this object will become invalid.
+ // The |creator| should be informed when the object goes away.
+ AppActivityProxy(Activity* replaced_activity, AppActivityRegistry* creator);
+
+ protected:
virtual ~AppActivityProxy();
- // Activity overrides:
+ // Activity overrides:
virtual ActivityViewModel* GetActivityViewModel() OVERRIDE;
virtual void SetCurrentState(ActivityState state) OVERRIDE;
virtual ActivityState GetCurrentState() OVERRIDE;
@@ -51,6 +56,11 @@ class AppActivityProxy : public Activity,
const gfx::ImageSkia image_;
const SkColor color_;
+ // The activity which gets replaced. It is used to sort the activity against
+ // upon initialization. Once moved, this value gets reset since the object
+ // can go away at any time.
+ Activity* replaced_activity_;
+
// The associated view.
views::View* view_;
« no previous file with comments | « athena/content/app_activity.cc ('k') | athena/content/app_activity_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698