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

Unified Diff: athena/content/app_activity_proxy.h

Issue 477523002: Athena: Adding basic resource management framework (un-/re-loading) of V2 applications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Aaaand another rebase. 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/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
new file mode 100644
index 0000000000000000000000000000000000000000..c5092e865129e7b47ec4563dd1a2bd798dbd03c1
--- /dev/null
+++ b/athena/content/app_activity_proxy.h
@@ -0,0 +1,63 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
+#define ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
+
+#include <vector>
+
+#include "athena/activity/public/activity.h"
+#include "athena/activity/public/activity_view_model.h"
+#include "athena/content/app_activity_proxy.h"
+#include "ui/gfx/image/image_skia.h"
+
+namespace athena {
+
+class AppActivityRegistry;
+
+// This activity object is a proxy placeholder for the application while it is
+// unloaded. When selected it will launch the applciation again and destroy
+// itself indirectly.
+class AppActivityProxy : public Activity,
+ public ActivityViewModel {
+ public:
+ AppActivityProxy(ActivityViewModel* view_model, AppActivityRegistry* creator);
+ virtual ~AppActivityProxy();
+
+ // Activity overrides:
+ virtual ActivityViewModel* GetActivityViewModel() OVERRIDE;
+ virtual void SetCurrentState(ActivityState state) OVERRIDE;
+ virtual ActivityState GetCurrentState() OVERRIDE;
+ virtual bool IsVisible() OVERRIDE;
+ virtual ActivityMediaState GetMediaState() OVERRIDE;
+ virtual aura::Window* GetWindow() OVERRIDE;
+
+ // ActivityViewModel overrides:
+ virtual void Init() OVERRIDE;
+ virtual SkColor GetRepresentativeColor() const OVERRIDE;
+ virtual base::string16 GetTitle() const OVERRIDE;
+ virtual bool UsesFrame() const OVERRIDE;
+ virtual views::View* GetContentsView() OVERRIDE;
+ virtual void CreateOverviewModeImage() OVERRIDE;
+ virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE;
+
+ private:
+ // The creator of this object which needs to be informed if the object gets
+ // destroyed or the application should get restarted.
+ AppActivityRegistry* app_activity_registry_;
+
+ // The presentation values.
+ const base::string16 title_;
+ const gfx::ImageSkia image_;
+ const SkColor color_;
+
+ // The associated view.
+ views::View* view_;
+
+ DISALLOW_COPY_AND_ASSIGN(AppActivityProxy);
+};
+
+} // namespace athena
+
+#endif // ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
« 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