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

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

Issue 358003002: Additions to Activities to allow resource management (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 5 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/DEPS ('k') | athena/content/app_activity.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef ATHENA_CONTENT_PUBLIC_APP_ACTIVITY_H_ 5 #ifndef ATHENA_CONTENT_PUBLIC_APP_ACTIVITY_H_
6 #define ATHENA_CONTENT_PUBLIC_APP_ACTIVITY_H_ 6 #define ATHENA_CONTENT_PUBLIC_APP_ACTIVITY_H_
7 7
8 #include "athena/activity/public/activity.h" 8 #include "athena/activity/public/activity.h"
9 #include "athena/activity/public/activity_view_model.h" 9 #include "athena/activity/public/activity_view_model.h"
10 #include "content/public/browser/web_contents_observer.h" 10 #include "content/public/browser/web_contents_observer.h"
11 #include "ui/gfx/image/image_skia.h"
11 12
12 namespace apps { 13 namespace apps {
13 class ShellAppWindow; 14 class ShellAppWindow;
14 } 15 }
15 16
16 namespace views { 17 namespace views {
17 class WebView; 18 class WebView;
18 } 19 }
19 20
20 namespace athena { 21 namespace athena {
21 22
22 class AppActivity : public Activity, 23 class AppActivity : public Activity,
23 public ActivityViewModel, 24 public ActivityViewModel,
24 public content::WebContentsObserver { 25 public content::WebContentsObserver {
25 public: 26 public:
26 explicit AppActivity(apps::ShellAppWindow* app_window); 27 explicit AppActivity(apps::ShellAppWindow* app_window);
27 virtual ~AppActivity(); 28 virtual ~AppActivity();
28 29
29 protected: 30 protected:
30 // Activity: 31 // Activity:
31 virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE; 32 virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE;
33 virtual void SetCurrentState(Activity::ActivityState state) OVERRIDE;
34 virtual ActivityState GetCurrentState() OVERRIDE;
35 virtual bool IsVisible() OVERRIDE;
36 virtual ActivityMediaState GetMediaState() OVERRIDE;
32 37
33 // ActivityViewModel: 38 // ActivityViewModel:
34 virtual void Init() OVERRIDE; 39 virtual void Init() OVERRIDE;
35 virtual SkColor GetRepresentativeColor() const OVERRIDE; 40 virtual SkColor GetRepresentativeColor() const OVERRIDE;
36 virtual base::string16 GetTitle() const OVERRIDE; 41 virtual base::string16 GetTitle() const OVERRIDE;
37 virtual bool UsesFrame() const OVERRIDE; 42 virtual bool UsesFrame() const OVERRIDE;
38 virtual views::View* GetContentsView() OVERRIDE; 43 virtual views::View* GetContentsView() OVERRIDE;
44 virtual void CreateOverviewModeImage() OVERRIDE;
45 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE;
39 46
40 // content::WebContentsObserver: 47 // content::WebContentsObserver:
41 virtual void TitleWasSet(content::NavigationEntry* entry, 48 virtual void TitleWasSet(content::NavigationEntry* entry,
42 bool explicit_set) OVERRIDE; 49 bool explicit_set) OVERRIDE;
43 virtual void DidUpdateFaviconURL( 50 virtual void DidUpdateFaviconURL(
44 const std::vector<content::FaviconURL>& candidates) OVERRIDE; 51 const std::vector<content::FaviconURL>& candidates) OVERRIDE;
45 52
46 private: 53 private:
47 scoped_ptr<apps::ShellAppWindow> app_window_; 54 scoped_ptr<apps::ShellAppWindow> app_window_;
48 views::WebView* web_view_; 55 views::WebView* web_view_;
49 56
57 // The current state for this activity.
58 ActivityState current_state_;
59
60 // The image which will be used in overview mode.
61 gfx::ImageSkia overview_mode_image_;
62
50 DISALLOW_COPY_AND_ASSIGN(AppActivity); 63 DISALLOW_COPY_AND_ASSIGN(AppActivity);
51 }; 64 };
52 65
53 } // namespace athena 66 } // namespace athena
54 67
55 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_ 68 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_
OLDNEW
« no previous file with comments | « athena/content/DEPS ('k') | athena/content/app_activity.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698