summaryrefslogtreecommitdiffstats
path: root/athena/content/web_activity.h
diff options
context:
space:
mode:
authorskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-12 23:01:10 +0000
committerskuhne@chromium.org <skuhne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-12 23:01:10 +0000
commit63e2b237a2ad35cb0197d5334e3806afc992a9f6 (patch)
tree641ae38a60f4ad0cd7db3e8266410bfbd4ef3f6e /athena/content/web_activity.h
parent25244a93e66e11add66883cda665bde981335ffb (diff)
downloadchromium_src-63e2b237a2ad35cb0197d5334e3806afc992a9f6.zip
chromium_src-63e2b237a2ad35cb0197d5334e3806afc992a9f6.tar.gz
chromium_src-63e2b237a2ad35cb0197d5334e3806afc992a9f6.tar.bz2
Additions to Activities to allow resource management
This is by no means finished. There are plenty of things to do - but I send it out now so that you can have a look at it as it is to see what my plans are. Note: The activities management functions are not yet called. So there should be no impact on anything running yet. Please have a look! If you generally agree I will try to get it in before I go on vacation, otherwise it will have to wait until I get back. I might even work tomorrow instead of taking off as planned if needed. BUG=388085 TEST=not yet done TBR=rsesek Review URL: https://codereview.chromium.org/358003002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282841 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'athena/content/web_activity.h')
-rw-r--r--athena/content/web_activity.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/athena/content/web_activity.h b/athena/content/web_activity.h
index ba44372..850f93a 100644
--- a/athena/content/web_activity.h
+++ b/athena/content/web_activity.h
@@ -8,6 +8,7 @@
#include "athena/activity/public/activity.h"
#include "athena/activity/public/activity_view_model.h"
#include "content/public/browser/web_contents_observer.h"
+#include "ui/gfx/image/image_skia.h"
namespace content {
class BrowserContext;
@@ -21,6 +22,8 @@ class WidgetDelegate;
namespace athena {
+class AthenaWebView;
+
class WebActivity : public Activity,
public ActivityViewModel,
public content::WebContentsObserver {
@@ -31,6 +34,10 @@ class WebActivity : public Activity,
protected:
// Activity:
virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE;
+ virtual void SetCurrentState(ActivityState state) OVERRIDE;
+ virtual ActivityState GetCurrentState() OVERRIDE;
+ virtual bool IsVisible() OVERRIDE;
+ virtual ActivityMediaState GetMediaState() OVERRIDE;
// ActivityViewModel:
virtual void Init() OVERRIDE;
@@ -38,6 +45,8 @@ class WebActivity : 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;
// content::WebContentsObserver:
virtual void TitleWasSet(content::NavigationEntry* entry,
@@ -48,7 +57,13 @@ class WebActivity : public Activity,
private:
content::BrowserContext* browser_context_;
const GURL url_;
- views::WebView* web_view_;
+ AthenaWebView* web_view_;
+
+ // The current state for this activity.
+ ActivityState current_state_;
+
+ // The image which will be used in overview mode.
+ gfx::ImageSkia overview_mode_image_;
DISALLOW_COPY_AND_ASSIGN(WebActivity);
};