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

Side by Side Diff: athena/content/app_activity_proxy.h

Issue 477523002: Athena: Adding basic resource management framework (un-/re-loading) of V2 applications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Aaaand another rebase. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « athena/content/app_activity.cc ('k') | athena/content/app_activity_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
6 #define ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
7
8 #include <vector>
9
10 #include "athena/activity/public/activity.h"
11 #include "athena/activity/public/activity_view_model.h"
12 #include "athena/content/app_activity_proxy.h"
13 #include "ui/gfx/image/image_skia.h"
14
15 namespace athena {
16
17 class AppActivityRegistry;
18
19 // This activity object is a proxy placeholder for the application while it is
20 // unloaded. When selected it will launch the applciation again and destroy
21 // itself indirectly.
22 class AppActivityProxy : public Activity,
23 public ActivityViewModel {
24 public:
25 AppActivityProxy(ActivityViewModel* view_model, AppActivityRegistry* creator);
26 virtual ~AppActivityProxy();
27
28 // Activity overrides:
29 virtual ActivityViewModel* GetActivityViewModel() OVERRIDE;
30 virtual void SetCurrentState(ActivityState state) OVERRIDE;
31 virtual ActivityState GetCurrentState() OVERRIDE;
32 virtual bool IsVisible() OVERRIDE;
33 virtual ActivityMediaState GetMediaState() OVERRIDE;
34 virtual aura::Window* GetWindow() OVERRIDE;
35
36 // ActivityViewModel overrides:
37 virtual void Init() OVERRIDE;
38 virtual SkColor GetRepresentativeColor() const OVERRIDE;
39 virtual base::string16 GetTitle() const OVERRIDE;
40 virtual bool UsesFrame() const OVERRIDE;
41 virtual views::View* GetContentsView() OVERRIDE;
42 virtual void CreateOverviewModeImage() OVERRIDE;
43 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE;
44
45 private:
46 // The creator of this object which needs to be informed if the object gets
47 // destroyed or the application should get restarted.
48 AppActivityRegistry* app_activity_registry_;
49
50 // The presentation values.
51 const base::string16 title_;
52 const gfx::ImageSkia image_;
53 const SkColor color_;
54
55 // The associated view.
56 views::View* view_;
57
58 DISALLOW_COPY_AND_ASSIGN(AppActivityProxy);
59 };
60
61 } // namespace athena
62
63 #endif // ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
OLDNEW
« no previous file with comments | « athena/content/app_activity.cc ('k') | athena/content/app_activity_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698