Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1024)

Side by Side Diff: athena/content/app_activity_proxy.h

Issue 591693002: Creating PNG images from web content to be used by OverviewMode navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_PROXY_H_ 5 #ifndef ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
6 #define ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_ 6 #define ATHENA_CONTENT_APP_ACTIVITY_PROXY_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"
11 #include "athena/activity/public/activity_view_model.h" 11 #include "athena/activity/public/activity_view_model.h"
12 #include "athena/content/content_proxy.h" 12 #include "athena/content/content_proxy.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "ui/gfx/image/image_skia.h"
15 14
16 namespace athena { 15 namespace athena {
17 16
18 class AppActivity; 17 class AppActivity;
19 class AppActivityRegistry; 18 class AppActivityRegistry;
20 19
21 // This activity object is a proxy placeholder for the application while it is 20 // This activity object is a proxy placeholder for the application while it is
22 // unloaded. When selected it will launch the applciation again and destroy 21 // unloaded. When selected it will launch the applciation again and destroy
23 // itself indirectly. 22 // itself indirectly.
24 class AppActivityProxy : public Activity, 23 class AppActivityProxy : public Activity,
(...skipping 17 matching lines...) Expand all
42 virtual aura::Window* GetWindow() OVERRIDE; 41 virtual aura::Window* GetWindow() OVERRIDE;
43 42
44 // ActivityViewModel overrides: 43 // ActivityViewModel overrides:
45 virtual void Init() OVERRIDE; 44 virtual void Init() OVERRIDE;
46 virtual SkColor GetRepresentativeColor() const OVERRIDE; 45 virtual SkColor GetRepresentativeColor() const OVERRIDE;
47 virtual base::string16 GetTitle() const OVERRIDE; 46 virtual base::string16 GetTitle() const OVERRIDE;
48 virtual gfx::ImageSkia GetIcon() const OVERRIDE; 47 virtual gfx::ImageSkia GetIcon() const OVERRIDE;
49 virtual bool UsesFrame() const OVERRIDE; 48 virtual bool UsesFrame() const OVERRIDE;
50 virtual views::View* GetContentsView() OVERRIDE; 49 virtual views::View* GetContentsView() OVERRIDE;
51 virtual views::Widget* CreateWidget() OVERRIDE; 50 virtual views::Widget* CreateWidget() OVERRIDE;
52 virtual gfx::ImageSkia GetOverviewModeImage() OVERRIDE; 51 virtual gfx::Image GetOverviewModeImage() OVERRIDE;
53 virtual void PrepareContentsForOverview() OVERRIDE; 52 virtual void PrepareContentsForOverview() OVERRIDE;
54 virtual void ResetContentsView() OVERRIDE; 53 virtual void ResetContentsView() OVERRIDE;
55 54
56 private: 55 private:
57 // The creator of this object which needs to be informed if the object gets 56 // The creator of this object which needs to be informed if the object gets
58 // destroyed or the application should get restarted. 57 // destroyed or the application should get restarted.
59 AppActivityRegistry* app_activity_registry_; 58 AppActivityRegistry* app_activity_registry_;
60 59
61 // The presentation values. 60 // The presentation values.
62 const base::string16 title_; 61 const base::string16 title_;
63 const SkColor color_; 62 const SkColor color_;
64 63
65 // The activity which gets replaced. It is used to sort the activity against 64 // The activity which gets replaced. It is used to sort the activity against
66 // upon initialization. Once moved, this value gets reset since the object 65 // upon initialization. Once moved, this value gets reset since the object
67 // can go away at any time. 66 // can go away at any time.
68 AppActivity* replaced_activity_; 67 AppActivity* replaced_activity_;
69 68
70 // The associated view. 69 // The associated view.
71 views::View* view_; 70 views::View* view_;
72 71
73 // The content proxy. 72 // The content proxy.
74 scoped_ptr<ContentProxy> content_proxy_; 73 scoped_ptr<ContentProxy> content_proxy_;
75 74
76 DISALLOW_COPY_AND_ASSIGN(AppActivityProxy); 75 DISALLOW_COPY_AND_ASSIGN(AppActivityProxy);
77 }; 76 };
78 77
79 } // namespace athena 78 } // namespace athena
80 79
81 #endif // ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_ 80 #endif // ATHENA_CONTENT_APP_ACTIVITY_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698