OLD | NEW |
---|---|
(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, | |
oshima
2014/08/15 15:15:59
This is for an unloaded app right?
This name sound
Mr4D (OOO till 08-26)
2014/08/18 16:09:32
UnloadedActivity would be incorrect. If something
| |
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_ | |
OLD | NEW |