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

Unified Diff: athena/content/app_activity.h

Issue 548633005: Adding overview / layer framework to Activities so that unloaded / sleeping activities can be shown… (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/DEPS ('k') | athena/content/app_activity.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/content/app_activity.h
diff --git a/athena/content/app_activity.h b/athena/content/app_activity.h
index e3aaed316dba0a790bfc91197b7ad21183835be7..905e9563ca224a1ac8bfba67fef0c88e830ec6d6 100644
--- a/athena/content/app_activity.h
+++ b/athena/content/app_activity.h
@@ -7,6 +7,8 @@
#include "athena/activity/public/activity.h"
#include "athena/activity/public/activity_view_model.h"
+#include "athena/content/app_activity_proxy.h"
+#include "base/memory/scoped_ptr.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/gfx/image/image_skia.h"
@@ -17,6 +19,7 @@ class WebView;
namespace athena {
class AppActivityRegistry;
+class ContentProxy;
// The activity object for a hosted V2 application.
class AppActivity : public Activity,
@@ -25,6 +28,9 @@ class AppActivity : public Activity,
public:
explicit AppActivity(const std::string& app_id);
+ // Gets the content proxy so that the AppProxy can take it over.
+ scoped_ptr<ContentProxy> GetContentProxy(aura::Window* window);
+
// Activity:
virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE;
virtual void SetCurrentState(Activity::ActivityState state) OVERRIDE;
@@ -40,7 +46,6 @@ class AppActivity : public Activity,
virtual gfx::ImageSkia GetIcon() const OVERRIDE;
virtual bool UsesFrame() const OVERRIDE;
virtual views::View* GetContentsView() OVERRIDE;
- virtual void CreateOverviewModeImage() OVERRIDE;
virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE;
virtual void PrepareContentsForOverview() OVERRIDE;
virtual void ResetContentsView() OVERRIDE;
@@ -60,17 +65,11 @@ class AppActivity : public Activity,
// Register this activity with its application.
void RegisterActivity();
- // Make the content visible. This call should only be paired with
- // MakeInvisible. Note: Upon start the content is visible.
- // TODO(skuhne): If this can be combined with web_activity, move this into a
- // separate class.
- void MakeVisible();
+ // Hiding the contet proxy and showing the real content instead.
+ void HideContentProxy();
- // Make the content invisible. This call should only be paired with
- // MakeVisible.
- // TODO(skuhne): If this can be combined with web_activity, move this into a
- // separate class.
- void MakeInvisible();
+ // Showing a content proxy instead of the real content to save resources.
+ void ShowContentProxy();
const std::string app_id_;
@@ -79,14 +78,14 @@ class AppActivity : public Activity,
// The current state for this activity.
ActivityState current_state_;
- // The image which will be used in overview mode.
- gfx::ImageSkia overview_mode_image_;
-
// If known the registry which holds all activities for the associated app.
// This object is owned by |AppRegistry| and will be a valid pointer as long
// as this object lives.
AppActivityRegistry* app_activity_registry_;
+ // The content proxy.
+ scoped_ptr<ContentProxy> content_proxy_;
+
DISALLOW_COPY_AND_ASSIGN(AppActivity);
};
« no previous file with comments | « athena/content/DEPS ('k') | athena/content/app_activity.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698