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); |
}; |