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_WEB_ACTIVITY_H_ | 5 #ifndef ATHENA_CONTENT_PUBLIC_WEB_ACTIVITY_H_ |
6 #define ATHENA_CONTENT_PUBLIC_WEB_ACTIVITY_H_ | 6 #define ATHENA_CONTENT_PUBLIC_WEB_ACTIVITY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "athena/activity/public/activity.h" | 10 #include "athena/activity/public/activity.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 public: | 42 public: |
43 WebActivity(content::BrowserContext* context, | 43 WebActivity(content::BrowserContext* context, |
44 const base::string16& title, | 44 const base::string16& title, |
45 const GURL& gurl); | 45 const GURL& gurl); |
46 WebActivity(AthenaWebView* web_view); | 46 WebActivity(AthenaWebView* web_view); |
47 | 47 |
48 protected: | 48 protected: |
49 virtual ~WebActivity(); | 49 virtual ~WebActivity(); |
50 | 50 |
51 // Activity: | 51 // Activity: |
52 virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE; | 52 virtual athena::ActivityViewModel* GetActivityViewModel() override; |
53 virtual void SetCurrentState(ActivityState state) OVERRIDE; | 53 virtual void SetCurrentState(ActivityState state) override; |
54 virtual ActivityState GetCurrentState() OVERRIDE; | 54 virtual ActivityState GetCurrentState() override; |
55 virtual bool IsVisible() OVERRIDE; | 55 virtual bool IsVisible() override; |
56 virtual ActivityMediaState GetMediaState() OVERRIDE; | 56 virtual ActivityMediaState GetMediaState() override; |
57 virtual aura::Window* GetWindow() OVERRIDE; | 57 virtual aura::Window* GetWindow() override; |
58 virtual content::WebContents* GetWebContents() OVERRIDE; | 58 virtual content::WebContents* GetWebContents() override; |
59 | 59 |
60 // ActivityViewModel: | 60 // ActivityViewModel: |
61 virtual void Init() OVERRIDE; | 61 virtual void Init() override; |
62 virtual SkColor GetRepresentativeColor() const OVERRIDE; | 62 virtual SkColor GetRepresentativeColor() const override; |
63 virtual base::string16 GetTitle() const OVERRIDE; | 63 virtual base::string16 GetTitle() const override; |
64 virtual gfx::ImageSkia GetIcon() const OVERRIDE; | 64 virtual gfx::ImageSkia GetIcon() const override; |
65 virtual bool UsesFrame() const OVERRIDE; | 65 virtual bool UsesFrame() const override; |
66 virtual views::View* GetContentsView() OVERRIDE; | 66 virtual views::View* GetContentsView() override; |
67 virtual views::Widget* CreateWidget() OVERRIDE; | 67 virtual views::Widget* CreateWidget() override; |
68 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE; | 68 virtual gfx::ImageSkia GetOverviewModeImage() override; |
69 virtual void PrepareContentsForOverview() OVERRIDE; | 69 virtual void PrepareContentsForOverview() override; |
70 virtual void ResetContentsView() OVERRIDE; | 70 virtual void ResetContentsView() override; |
71 | 71 |
72 // content::WebContentsObserver: | 72 // content::WebContentsObserver: |
73 virtual void DidNavigateMainFrame( | 73 virtual void DidNavigateMainFrame( |
74 const content::LoadCommittedDetails& details, | 74 const content::LoadCommittedDetails& details, |
75 const content::FrameNavigateParams& params) OVERRIDE; | 75 const content::FrameNavigateParams& params) override; |
76 virtual void TitleWasSet(content::NavigationEntry* entry, | 76 virtual void TitleWasSet(content::NavigationEntry* entry, |
77 bool explicit_set) OVERRIDE; | 77 bool explicit_set) override; |
78 virtual void DidUpdateFaviconURL( | 78 virtual void DidUpdateFaviconURL( |
79 const std::vector<content::FaviconURL>& candidates) OVERRIDE; | 79 const std::vector<content::FaviconURL>& candidates) override; |
80 virtual void DidChangeThemeColor(SkColor theme_color) OVERRIDE; | 80 virtual void DidChangeThemeColor(SkColor theme_color) override; |
81 | 81 |
82 private: | 82 private: |
83 // Called when a favicon download initiated in DidUpdateFaviconURL() | 83 // Called when a favicon download initiated in DidUpdateFaviconURL() |
84 // has completed. | 84 // has completed. |
85 void OnDidDownloadFavicon( | 85 void OnDidDownloadFavicon( |
86 int id, | 86 int id, |
87 int http_status_code, | 87 int http_status_code, |
88 const GURL& url, | 88 const GURL& url, |
89 const std::vector<SkBitmap>& bitmaps, | 89 const std::vector<SkBitmap>& bitmaps, |
90 const std::vector<gfx::Size>& original_bitmap_sizes); | 90 const std::vector<gfx::Size>& original_bitmap_sizes); |
(...skipping 17 matching lines...) Expand all Loading... |
108 scoped_ptr<ContentProxy> content_proxy_; | 108 scoped_ptr<ContentProxy> content_proxy_; |
109 | 109 |
110 base::WeakPtrFactory<WebActivity> weak_ptr_factory_; | 110 base::WeakPtrFactory<WebActivity> weak_ptr_factory_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(WebActivity); | 112 DISALLOW_COPY_AND_ASSIGN(WebActivity); |
113 }; | 113 }; |
114 | 114 |
115 } // namespace athena | 115 } // namespace athena |
116 | 116 |
117 #endif // ATHENA_CONTENT_WEB_ACTIVITY_H_ | 117 #endif // ATHENA_CONTENT_WEB_ACTIVITY_H_ |
OLD | NEW |