OLD | NEW |
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_APP_ACTIVITY_H_ | 5 #ifndef ATHENA_CONTENT_APP_ACTIVITY_H_ |
6 #define ATHENA_CONTENT_APP_ACTIVITY_H_ | 6 #define ATHENA_CONTENT_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 "athena/content/app_activity_proxy.h" | 10 #include "athena/content/app_activity_proxy.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class AppActivity : public Activity, | 24 class AppActivity : public Activity, |
25 public ActivityViewModel, | 25 public ActivityViewModel, |
26 public content::WebContentsObserver { | 26 public content::WebContentsObserver { |
27 public: | 27 public: |
28 AppActivity(const std::string& app_id, views::WebView* web_view); | 28 AppActivity(const std::string& app_id, views::WebView* web_view); |
29 | 29 |
30 // Gets the content proxy so that the AppActivityProxy can take it over. | 30 // Gets the content proxy so that the AppActivityProxy can take it over. |
31 scoped_ptr<ContentProxy> GetContentProxy(); | 31 scoped_ptr<ContentProxy> GetContentProxy(); |
32 | 32 |
33 // Activity: | 33 // Activity: |
34 virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE; | 34 virtual athena::ActivityViewModel* GetActivityViewModel() override; |
35 virtual void SetCurrentState(Activity::ActivityState state) OVERRIDE; | 35 virtual void SetCurrentState(Activity::ActivityState state) override; |
36 virtual ActivityState GetCurrentState() OVERRIDE; | 36 virtual ActivityState GetCurrentState() override; |
37 virtual bool IsVisible() OVERRIDE; | 37 virtual bool IsVisible() override; |
38 virtual ActivityMediaState GetMediaState() OVERRIDE; | 38 virtual ActivityMediaState GetMediaState() override; |
39 virtual aura::Window* GetWindow() OVERRIDE; | 39 virtual aura::Window* GetWindow() override; |
40 virtual content::WebContents* GetWebContents() OVERRIDE; | 40 virtual content::WebContents* GetWebContents() override; |
41 | 41 |
42 // ActivityViewModel: | 42 // ActivityViewModel: |
43 virtual void Init() OVERRIDE; | 43 virtual void Init() override; |
44 virtual SkColor GetRepresentativeColor() const OVERRIDE; | 44 virtual SkColor GetRepresentativeColor() const override; |
45 virtual base::string16 GetTitle() const OVERRIDE; | 45 virtual base::string16 GetTitle() const override; |
46 virtual gfx::ImageSkia GetIcon() const OVERRIDE; | 46 virtual gfx::ImageSkia GetIcon() const override; |
47 virtual bool UsesFrame() const OVERRIDE; | 47 virtual bool UsesFrame() const override; |
48 virtual views::Widget* CreateWidget() OVERRIDE; | 48 virtual views::Widget* CreateWidget() override; |
49 virtual views::View* GetContentsView() OVERRIDE; | 49 virtual views::View* GetContentsView() override; |
50 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE; | 50 virtual gfx::ImageSkia GetOverviewModeImage() override; |
51 virtual void PrepareContentsForOverview() OVERRIDE; | 51 virtual void PrepareContentsForOverview() override; |
52 virtual void ResetContentsView() OVERRIDE; | 52 virtual void ResetContentsView() override; |
53 | 53 |
54 protected: | 54 protected: |
55 // Constructor for test. | 55 // Constructor for test. |
56 explicit AppActivity(const std::string& app_id); | 56 explicit AppActivity(const std::string& app_id); |
57 | 57 |
58 virtual ~AppActivity(); | 58 virtual ~AppActivity(); |
59 | 59 |
60 private: | 60 private: |
61 // content::WebContentsObserver: | 61 // content::WebContentsObserver: |
62 virtual void TitleWasSet(content::NavigationEntry* entry, | 62 virtual void TitleWasSet(content::NavigationEntry* entry, |
63 bool explicit_set) OVERRIDE; | 63 bool explicit_set) override; |
64 virtual void DidUpdateFaviconURL( | 64 virtual void DidUpdateFaviconURL( |
65 const std::vector<content::FaviconURL>& candidates) OVERRIDE; | 65 const std::vector<content::FaviconURL>& candidates) override; |
66 | 66 |
67 // Register this activity with its application. | 67 // Register this activity with its application. |
68 void RegisterActivity(); | 68 void RegisterActivity(); |
69 | 69 |
70 // Hiding the contet proxy and showing the real content instead. | 70 // Hiding the contet proxy and showing the real content instead. |
71 void HideContentProxy(); | 71 void HideContentProxy(); |
72 | 72 |
73 // Showing a content proxy instead of the real content to save resources. | 73 // Showing a content proxy instead of the real content to save resources. |
74 void ShowContentProxy(); | 74 void ShowContentProxy(); |
75 | 75 |
(...skipping 11 matching lines...) Expand all Loading... |
87 | 87 |
88 // The content proxy. | 88 // The content proxy. |
89 scoped_ptr<ContentProxy> content_proxy_; | 89 scoped_ptr<ContentProxy> content_proxy_; |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(AppActivity); | 91 DISALLOW_COPY_AND_ASSIGN(AppActivity); |
92 }; | 92 }; |
93 | 93 |
94 } // namespace athena | 94 } // namespace athena |
95 | 95 |
96 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_ | 96 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_ |
OLD | NEW |