| 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_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" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class AppActivity : public Activity, | 22 class AppActivity : public Activity, |
| 23 public ActivityViewModel, | 23 public ActivityViewModel, |
| 24 public content::WebContentsObserver { | 24 public content::WebContentsObserver { |
| 25 public: | 25 public: |
| 26 explicit AppActivity(apps::ShellAppWindow* app_window); | 26 explicit AppActivity(apps::ShellAppWindow* app_window); |
| 27 virtual ~AppActivity(); | 27 virtual ~AppActivity(); |
| 28 | 28 |
| 29 protected: | 29 protected: |
| 30 // Activity: | 30 // Activity: |
| 31 virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE; | 31 virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE; |
| 32 virtual void SetCurrentState(ActivityStateTransition state) OVERRIDE; |
| 33 virtual ActivityState GetCurrentState() OVERRIDE; |
| 32 | 34 |
| 33 // ActivityViewModel: | 35 // ActivityViewModel: |
| 34 virtual void Init() OVERRIDE; | 36 virtual void Init() OVERRIDE; |
| 35 virtual SkColor GetRepresentativeColor() OVERRIDE; | 37 virtual SkColor GetRepresentativeColor() OVERRIDE; |
| 36 virtual base::string16 GetTitle() OVERRIDE; | 38 virtual base::string16 GetTitle() OVERRIDE; |
| 37 virtual views::View* GetContentsView() OVERRIDE; | 39 virtual views::View* GetContentsView() OVERRIDE; |
| 40 virtual void CreateOverviewModeImage() OVERRIDE; |
| 41 virtual const gfx::ImageSkia GetOverviewModeImage() OVERRIDE; |
| 38 | 42 |
| 39 // content::WebContentsObserver: | 43 // content::WebContentsObserver: |
| 40 virtual void TitleWasSet(content::NavigationEntry* entry, | 44 virtual void TitleWasSet(content::NavigationEntry* entry, |
| 41 bool explicit_set) OVERRIDE; | 45 bool explicit_set) OVERRIDE; |
| 42 virtual void DidUpdateFaviconURL( | 46 virtual void DidUpdateFaviconURL( |
| 43 const std::vector<content::FaviconURL>& candidates) OVERRIDE; | 47 const std::vector<content::FaviconURL>& candidates) OVERRIDE; |
| 44 | 48 |
| 45 private: | 49 private: |
| 46 scoped_ptr<apps::ShellAppWindow> app_window_; | 50 scoped_ptr<apps::ShellAppWindow> app_window_; |
| 47 views::WebView* web_view_; | 51 views::WebView* web_view_; |
| 48 | 52 |
| 53 // The last requested state for this activity. |
| 54 ActivityState last_requested_state_; |
| 55 |
| 56 // The image which will be uded in overview mode. |
| 57 gfx::ImageSkia overview_mode_image_; |
| 58 |
| 49 DISALLOW_COPY_AND_ASSIGN(AppActivity); | 59 DISALLOW_COPY_AND_ASSIGN(AppActivity); |
| 50 }; | 60 }; |
| 51 | 61 |
| 52 } // namespace athena | 62 } // namespace athena |
| 53 | 63 |
| 54 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_ | 64 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_ |
| OLD | NEW |