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_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ | 5 #ifndef ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ |
6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ | 6 #define ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ |
7 | 7 |
8 #include "athena/athena_export.h" | 8 #include "athena/athena_export.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 | 10 |
11 typedef unsigned int SkColor; | 11 typedef unsigned int SkColor; |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class Image; | |
14 class ImageSkia; | 15 class ImageSkia; |
15 } | 16 } |
16 | 17 |
17 namespace views { | 18 namespace views { |
18 class View; | 19 class View; |
19 class Widget; | 20 class Widget; |
20 } | 21 } |
21 | 22 |
22 namespace athena { | 23 namespace athena { |
23 | 24 |
(...skipping 27 matching lines...) Expand all Loading... | |
51 virtual views::View* GetContentsView() = 0; | 52 virtual views::View* GetContentsView() = 0; |
52 | 53 |
53 // Creates a custom widget for the activity. Returns NULL to use default | 54 // Creates a custom widget for the activity. Returns NULL to use default |
54 // implementation. | 55 // implementation. |
55 virtual views::Widget* CreateWidget() = 0; | 56 virtual views::Widget* CreateWidget() = 0; |
56 | 57 |
57 // Returns an image which can be used to represent the activity in e.g. the | 58 // Returns an image which can be used to represent the activity in e.g. the |
58 // overview mode. The returned image can have no size if either a view exists | 59 // overview mode. The returned image can have no size if either a view exists |
59 // or the activity has not yet been loaded. In that case | 60 // or the activity has not yet been loaded. In that case |
60 // GetRepresentativeColor() should be used to clear the preview area. | 61 // GetRepresentativeColor() should be used to clear the preview area. |
62 // The ownership gets passed to the caller. | |
oshima
2014/09/24 00:40:01
gfx::Image shares the internal storage, so this ma
Mr4D (OOO till 08-26)
2014/09/24 16:18:25
Since the ActivityViewModel does not keep a refere
| |
61 // Note: We intentionally do not use a layer / view for this. | 63 // Note: We intentionally do not use a layer / view for this. |
62 virtual gfx::ImageSkia GetOverviewModeImage() = 0; | 64 virtual gfx::Image GetOverviewModeImage() = 0; |
oshima
2014/09/24 00:40:01
I think gfx::ImageSkia is enough. You may land it
| |
63 | 65 |
64 // Prepares the contents view for overview. | 66 // Prepares the contents view for overview. |
65 virtual void PrepareContentsForOverview() = 0; | 67 virtual void PrepareContentsForOverview() = 0; |
66 | 68 |
67 // Undoes any changes done by PrepareContentsForOverview(). | 69 // Undoes any changes done by PrepareContentsForOverview(). |
68 virtual void ResetContentsView() = 0; | 70 virtual void ResetContentsView() = 0; |
69 }; | 71 }; |
70 | 72 |
71 } // namespace athena | 73 } // namespace athena |
72 | 74 |
73 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ | 75 #endif // ATHENA_ACTIVITY_PUBLIC_ACTIVITY_VIEW_MODEL_H_ |
OLD | NEW |