[NaCl SDK]: Docs -- fix typo in nacl manifest specification (missing "portable")
[chromium-blink-merge.git] / athena / content / web_activity.h
blob850f93af69ddd536e73717d71e3a72389deffa19
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
3 // found in the LICENSE file.
5 #ifndef ATHENA_CONTENT_PUBLIC_WEB_ACTIVITY_H_
6 #define ATHENA_CONTENT_PUBLIC_WEB_ACTIVITY_H_
8 #include "athena/activity/public/activity.h"
9 #include "athena/activity/public/activity_view_model.h"
10 #include "content/public/browser/web_contents_observer.h"
11 #include "ui/gfx/image/image_skia.h"
13 namespace content {
14 class BrowserContext;
15 class WebContents;
18 namespace views {
19 class WebView;
20 class WidgetDelegate;
23 namespace athena {
25 class AthenaWebView;
27 class WebActivity : public Activity,
28 public ActivityViewModel,
29 public content::WebContentsObserver {
30 public:
31 WebActivity(content::BrowserContext* context, const GURL& gurl);
32 virtual ~WebActivity();
34 protected:
35 // Activity:
36 virtual athena::ActivityViewModel* GetActivityViewModel() OVERRIDE;
37 virtual void SetCurrentState(ActivityState state) OVERRIDE;
38 virtual ActivityState GetCurrentState() OVERRIDE;
39 virtual bool IsVisible() OVERRIDE;
40 virtual ActivityMediaState GetMediaState() OVERRIDE;
42 // ActivityViewModel:
43 virtual void Init() OVERRIDE;
44 virtual SkColor GetRepresentativeColor() const OVERRIDE;
45 virtual base::string16 GetTitle() const OVERRIDE;
46 virtual bool UsesFrame() const OVERRIDE;
47 virtual views::View* GetContentsView() OVERRIDE;
48 virtual void CreateOverviewModeImage() OVERRIDE;
49 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE;
51 // content::WebContentsObserver:
52 virtual void TitleWasSet(content::NavigationEntry* entry,
53 bool explicit_set) OVERRIDE;
54 virtual void DidUpdateFaviconURL(
55 const std::vector<content::FaviconURL>& candidates) OVERRIDE;
57 private:
58 content::BrowserContext* browser_context_;
59 const GURL url_;
60 AthenaWebView* web_view_;
62 // The current state for this activity.
63 ActivityState current_state_;
65 // The image which will be used in overview mode.
66 gfx::ImageSkia overview_mode_image_;
68 DISALLOW_COPY_AND_ASSIGN(WebActivity);
71 } // namespace athena
73 #endif // ATHENA_CONTENT_WEB_ACTIVITY_H_