| Index: athena/content/app_activity.h
|
| diff --git a/athena/content/app_activity.h b/athena/content/app_activity.h
|
| index 3c6959668ea3536d3ecf299ada2ab1ded7a68a99..b15866cf090e7a184a1b580be1a8a8df3e46dfe3 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"
|
|
|
| @@ -21,6 +23,7 @@ class WebView;
|
| namespace athena {
|
|
|
| class AppActivityRegistry;
|
| +class ContentProxy;
|
|
|
| // The activity object for a hosted V2 application.
|
| class AppActivity : public Activity,
|
| @@ -29,6 +32,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;
|
| @@ -43,7 +49,6 @@ class AppActivity : public Activity,
|
| 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;
|
| virtual void PrepareContentsForOverview() OVERRIDE;
|
| virtual void ResetContentsView() OVERRIDE;
|
| @@ -63,17 +68,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 resoruces.
|
| + void ShowContentProxy();
|
|
|
| const std::string app_id_;
|
|
|
| @@ -82,14 +81,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);
|
| };
|
|
|
|
|