| 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" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "content/public/browser/web_contents_observer.h" | 12 #include "content/public/browser/web_contents_observer.h" |
| 13 #include "ui/gfx/image/image_skia.h" | |
| 14 | 13 |
| 15 namespace extensions { | 14 namespace extensions { |
| 16 class AppWindow; | 15 class AppWindow; |
| 17 } | 16 } |
| 18 | 17 |
| 19 namespace views { | 18 namespace views { |
| 20 class WebView; | 19 class WebView; |
| 21 } | 20 } |
| 22 | 21 |
| 23 namespace athena { | 22 namespace athena { |
| 24 | 23 |
| 25 class AppActivityRegistry; | 24 class AppActivityRegistry; |
| 26 class ContentProxy; | 25 class ContentProxy; |
| 27 | 26 |
| 28 // The activity object for a hosted V2 application. | 27 // The activity object for a hosted V2 application. |
| 29 // TODO(oshima): Move this to athena/extensions | 28 // TODO(oshima): Move this to athena/extensions |
| 30 class AppActivity : public Activity, | 29 class AppActivity : public Activity, |
| 31 public ActivityViewModel, | 30 public ActivityViewModel, |
| 32 public content::WebContentsObserver { | 31 public content::WebContentsObserver { |
| 33 public: | 32 public: |
| 34 AppActivity(extensions::AppWindow* app_window, views::WebView* web_view); | 33 AppActivity(extensions::AppWindow* app_window, views::WebView* web_view); |
| 35 | 34 |
| 36 // Gets the content proxy so that the AppProxy can take it over. | 35 // Gets the content proxy so that the AppActivityProxy can take it over. |
| 37 scoped_ptr<ContentProxy> GetContentProxy(aura::Window* window); | 36 scoped_ptr<ContentProxy> GetContentProxy(); |
| 38 | 37 |
| 39 // Activity: | 38 // Activity: |
| 40 virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE; | 39 virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE; |
| 41 virtual void SetCurrentState(Activity::ActivityState state) OVERRIDE; | 40 virtual void SetCurrentState(Activity::ActivityState state) OVERRIDE; |
| 42 virtual ActivityState GetCurrentState() OVERRIDE; | 41 virtual ActivityState GetCurrentState() OVERRIDE; |
| 43 virtual bool IsVisible() OVERRIDE; | 42 virtual bool IsVisible() OVERRIDE; |
| 44 virtual ActivityMediaState GetMediaState() OVERRIDE; | 43 virtual ActivityMediaState GetMediaState() OVERRIDE; |
| 45 virtual aura::Window* GetWindow() OVERRIDE; | 44 virtual aura::Window* GetWindow() OVERRIDE; |
| 46 virtual content::WebContents* GetWebContents() OVERRIDE; | 45 virtual content::WebContents* GetWebContents() OVERRIDE; |
| 47 | 46 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 | 92 |
| 94 // The content proxy. | 93 // The content proxy. |
| 95 scoped_ptr<ContentProxy> content_proxy_; | 94 scoped_ptr<ContentProxy> content_proxy_; |
| 96 | 95 |
| 97 DISALLOW_COPY_AND_ASSIGN(AppActivity); | 96 DISALLOW_COPY_AND_ASSIGN(AppActivity); |
| 98 }; | 97 }; |
| 99 | 98 |
| 100 } // namespace athena | 99 } // namespace athena |
| 101 | 100 |
| 102 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_ | 101 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_ |
| OLD | NEW |