Index: athena/content/web_activity.h |
diff --git a/athena/content/web_activity.h b/athena/content/web_activity.h |
index 6f8f9a96d45ecac700916431f617b220bd8e269d..fb32c6458cd5d803a35684a5b385c1b2c0ef63ef 100644 |
--- a/athena/content/web_activity.h |
+++ b/athena/content/web_activity.h |
@@ -7,6 +7,7 @@ |
#include "athena/activity/public/activity.h" |
#include "athena/activity/public/activity_view_model.h" |
+#include "base/memory/scoped_ptr.h" |
#include "base/strings/string16.h" |
#include "content/public/browser/web_contents_observer.h" |
#include "ui/gfx/image/image_skia.h" |
@@ -24,6 +25,7 @@ class WidgetDelegate; |
namespace athena { |
class AthenaWebView; |
+class ContentProxy; |
class WebActivity : public Activity, |
public ActivityViewModel, |
@@ -51,7 +53,6 @@ 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; |
virtual void PrepareContentsForOverview() OVERRIDE; |
virtual void ResetContentsView() OVERRIDE; |
@@ -64,13 +65,11 @@ class WebActivity : public Activity, |
virtual void DidChangeThemeColor(SkColor theme_color) OVERRIDE; |
private: |
- // Make the content visible. This call should only be paired with |
- // MakeInvisible. Note: Upon object creation the content is visible. |
- 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. |
- void MakeInvisible(); |
+ // Showing a content proxy instead of the real content to save resoruces. |
+ void ShowContentProxy(); |
// Reload the content if required, and start observing it. |
void ReloadAndObserve(); |
@@ -84,8 +83,8 @@ class WebActivity : 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_; |
+ // The content proxy. |
+ scoped_ptr<ContentProxy> content_proxy_; |
DISALLOW_COPY_AND_ASSIGN(WebActivity); |
}; |