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

Unified Diff: athena/content/app_activity_proxy.cc

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: 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
Index: athena/content/app_activity_proxy.cc
diff --git a/athena/content/app_activity_proxy.cc b/athena/content/app_activity_proxy.cc
index a5ca0f41a6c7147d07ef6d42a7f795ef05103358..96a296e925767150a06c6e09ba125dad4352e41f 100644
--- a/athena/content/app_activity_proxy.cc
+++ b/athena/content/app_activity_proxy.cc
@@ -4,6 +4,7 @@
#include "athena/content/app_activity_proxy.h"
+#include "athena/content/app_activity.h"
#include "athena/content/app_activity_registry.h"
#include "ui/aura/window.h"
#include "ui/views/view.h"
@@ -11,15 +12,12 @@
namespace athena {
-AppActivityProxy::AppActivityProxy(Activity* replaced_activity,
+AppActivityProxy::AppActivityProxy(AppActivity* replaced_activity,
AppActivityRegistry* creator) :
app_activity_registry_(creator),
title_(replaced_activity->GetActivityViewModel()->GetTitle()),
- image_(replaced_activity->GetActivityViewModel()->GetOverviewModeImage()),
color_(replaced_activity->GetActivityViewModel()->GetRepresentativeColor()),
replaced_activity_(replaced_activity),
- // TODO(skuhne): We probably need to do something better with the view
- // (e.g. showing the passed image / layer).
view_(new views::View()) {
}
@@ -62,7 +60,10 @@ void AppActivityProxy::Init() {
// At this point we can move the Activity to its proper Activity location.
aura::Window* relative_window = replaced_activity_->GetWindow();
relative_window->parent()->StackChildBelow(GetWindow(), relative_window);
- // We moved.
+ // Get the content proxy to present the content.
+ content_proxy_ = replaced_activity_->GetContentProxy(GetWindow());
+ // After the Init() function returns, the passed |replaced_activity_| might
+ // get destroyed. Since we do not need it anymore we reset it.
replaced_activity_ = NULL;
}
@@ -82,12 +83,8 @@ views::View* AppActivityProxy::GetContentsView() {
return view_;
}
-void AppActivityProxy::CreateOverviewModeImage() {
- // Nothing we can do here.
-}
-
gfx::ImageSkia AppActivityProxy::GetOverviewModeImage() {
- return image_;
+ return content_proxy_->GetContentImage();
}
void AppActivityProxy::PrepareContentsForOverview() {

Powered by Google App Engine
This is Rietveld 408576698