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

Unified Diff: trunk/src/athena/content/app_activity_proxy.cc

Issue 497013002: Revert 291221 "Athena: Adding basic resource management framewor..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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
« no previous file with comments | « trunk/src/athena/content/app_activity_proxy.h ('k') | trunk/src/athena/content/app_activity_registry.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/athena/content/app_activity_proxy.cc
===================================================================
--- trunk/src/athena/content/app_activity_proxy.cc (revision 291366)
+++ trunk/src/athena/content/app_activity_proxy.cc (working copy)
@@ -1,84 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "athena/content/app_activity_proxy.h"
-
-#include "athena/content/app_activity_registry.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace athena {
-
-AppActivityProxy::AppActivityProxy(ActivityViewModel* view_model,
- AppActivityRegistry* creator) :
- app_activity_registry_(creator),
- title_(view_model->GetTitle()),
- image_(view_model->GetOverviewModeImage()),
- color_(view_model->GetRepresentativeColor()),
- // TODO(skuhne): We probably need to do something better with the view
- // (e.g. showing the image).
- view_(new views::View()) {}
-
-AppActivityProxy::~AppActivityProxy() {
- app_activity_registry_->ProxyDestroyed(this);
-}
-
-ActivityViewModel* AppActivityProxy::GetActivityViewModel() {
- return this;
-}
-
-void AppActivityProxy::SetCurrentState(ActivityState state) {
- // We ignore all calls which try to re-load the application at a lower than
- // running invisible state.
- if (state != ACTIVITY_VISIBLE && state != ACTIVITY_INVISIBLE)
- return;
- app_activity_registry_->RestartApplication(this);
- // Note: This object is now destroyed.
-}
-
-Activity::ActivityState AppActivityProxy::GetCurrentState() {
- return ACTIVITY_UNLOADED;
-}
-
-bool AppActivityProxy::IsVisible() {
- return true;
-}
-
-Activity::ActivityMediaState AppActivityProxy::GetMediaState() {
- // This proxy has never any media playing.
- return ACTIVITY_MEDIA_STATE_NONE;
-}
-
-aura::Window* AppActivityProxy::GetWindow() {
- return view_->GetWidget()->GetNativeWindow();
-}
-
-void AppActivityProxy::Init() {
-}
-
-SkColor AppActivityProxy::GetRepresentativeColor() const {
- return color_;
-}
-
-base::string16 AppActivityProxy::GetTitle() const {
- return title_;
-}
-
-bool AppActivityProxy::UsesFrame() const {
- return true;
-}
-
-views::View* AppActivityProxy::GetContentsView() {
- return view_;
-}
-
-void AppActivityProxy::CreateOverviewModeImage() {
- // Nothing we can do here.
-}
-
-gfx::ImageSkia AppActivityProxy::GetOverviewModeImage() {
- return image_;
-}
-
-} // namespace athena
« no previous file with comments | « trunk/src/athena/content/app_activity_proxy.h ('k') | trunk/src/athena/content/app_activity_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698