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

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: Addressed 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 bf08a592c1cb28d141630ccd6229e95978b2e1f7..060371289fa28aec733f16ffb2ab186dc3a51b0d 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 "athena/wm/public/window_list_provider.h"
#include "athena/wm/public/window_manager.h"
@@ -13,15 +14,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()) {
}
@@ -64,7 +62,10 @@ void AppActivityProxy::Init() {
WindowManager::GetInstance()->GetWindowListProvider();
window_list_provider->StackWindowBehindTo(GetWindow(),
replaced_activity_->GetWindow());
- // 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;
}
@@ -84,12 +85,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