| 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 "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 #include "ui/gfx/image/image_skia.h" |
| 12 | 12 |
| 13 namespace contents { | |
| 14 class WebContents; | |
| 15 } | |
| 16 | |
| 17 namespace views { | 13 namespace views { |
| 18 class WebView; | 14 class WebView; |
| 19 } | 15 } |
| 20 | 16 |
| 21 namespace athena { | 17 namespace athena { |
| 22 | 18 |
| 23 class AppActivityRegistry; | 19 class AppActivityRegistry; |
| 24 | 20 |
| 25 // The activity object for a hosted V2 application. | 21 // The activity object for a hosted V2 application. |
| 26 class AppActivity : public Activity, | 22 class AppActivity : public Activity, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 50 | 46 |
| 51 protected: | 47 protected: |
| 52 virtual ~AppActivity(); | 48 virtual ~AppActivity(); |
| 53 | 49 |
| 54 // content::WebContentsObserver: | 50 // content::WebContentsObserver: |
| 55 virtual void TitleWasSet(content::NavigationEntry* entry, | 51 virtual void TitleWasSet(content::NavigationEntry* entry, |
| 56 bool explicit_set) OVERRIDE; | 52 bool explicit_set) OVERRIDE; |
| 57 virtual void DidUpdateFaviconURL( | 53 virtual void DidUpdateFaviconURL( |
| 58 const std::vector<content::FaviconURL>& candidates) OVERRIDE; | 54 const std::vector<content::FaviconURL>& candidates) OVERRIDE; |
| 59 | 55 |
| 60 virtual content::WebContents* GetWebContents() = 0; | 56 virtual views::WebView* GetWebView() = 0; |
| 61 | 57 |
| 62 private: | 58 private: |
| 63 // Register this activity with its application. | 59 // Register this activity with its application. |
| 64 void RegisterActivity(); | 60 void RegisterActivity(); |
| 65 | 61 |
| 66 // Make the content visible. This call should only be paired with | 62 // Make the content visible. This call should only be paired with |
| 67 // MakeInvisible. Note: Upon start the content is visible. | 63 // MakeInvisible. Note: Upon start the content is visible. |
| 68 // TODO(skuhne): If this can be combined with web_activity, move this into a | 64 // TODO(skuhne): If this can be combined with web_activity, move this into a |
| 69 // separate class. | 65 // separate class. |
| 70 void MakeVisible(); | 66 void MakeVisible(); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 89 // This object is owned by |AppRegistry| and will be a valid pointer as long | 85 // This object is owned by |AppRegistry| and will be a valid pointer as long |
| 90 // as this object lives. | 86 // as this object lives. |
| 91 AppActivityRegistry* app_activity_registry_; | 87 AppActivityRegistry* app_activity_registry_; |
| 92 | 88 |
| 93 DISALLOW_COPY_AND_ASSIGN(AppActivity); | 89 DISALLOW_COPY_AND_ASSIGN(AppActivity); |
| 94 }; | 90 }; |
| 95 | 91 |
| 96 } // namespace athena | 92 } // namespace athena |
| 97 | 93 |
| 98 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_ | 94 #endif // ATHENA_CONTENT_APP_ACTIVITY_H_ |
| OLD | NEW |