Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / athena / content / app_activity_proxy.h
blob407beac2acbe5816c2503190d38be01bea842f9b
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.
5 #ifndef ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
6 #define ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
8 #include <vector>
10 #include "athena/activity/public/activity.h"
11 #include "athena/activity/public/activity_view_model.h"
12 #include "ui/gfx/image/image_skia.h"
14 namespace athena {
16 class AppActivityRegistry;
18 // This activity object is a proxy placeholder for the application while it is
19 // unloaded. When selected it will launch the applciation again and destroy
20 // itself indirectly.
21 class AppActivityProxy : public Activity,
22 public ActivityViewModel {
23 public:
24 AppActivityProxy(ActivityViewModel* view_model, AppActivityRegistry* creator);
25 virtual ~AppActivityProxy();
27 // Activity overrides:
28 virtual ActivityViewModel* GetActivityViewModel() OVERRIDE;
29 virtual void SetCurrentState(ActivityState state) OVERRIDE;
30 virtual ActivityState GetCurrentState() OVERRIDE;
31 virtual bool IsVisible() OVERRIDE;
32 virtual ActivityMediaState GetMediaState() OVERRIDE;
33 virtual aura::Window* GetWindow() OVERRIDE;
35 // ActivityViewModel overrides:
36 virtual void Init() OVERRIDE;
37 virtual SkColor GetRepresentativeColor() const OVERRIDE;
38 virtual base::string16 GetTitle() const OVERRIDE;
39 virtual bool UsesFrame() const OVERRIDE;
40 virtual views::View* GetContentsView() OVERRIDE;
41 virtual void CreateOverviewModeImage() OVERRIDE;
42 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE;
44 private:
45 // The creator of this object which needs to be informed if the object gets
46 // destroyed or the application should get restarted.
47 AppActivityRegistry* app_activity_registry_;
49 // The presentation values.
50 const base::string16 title_;
51 const gfx::ImageSkia image_;
52 const SkColor color_;
54 // The associated view.
55 views::View* view_;
57 DISALLOW_COPY_AND_ASSIGN(AppActivityProxy);
60 } // namespace athena
62 #endif // ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_