OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_RESOURCES_H_ | 5 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_RESOURCES_H_ |
6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_RESOURCES_H_ | 6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_RESOURCES_H_ |
7 | 7 |
| 8 #include <string> |
| 9 |
8 #include "ash/ash_export.h" | 10 #include "ash/ash_export.h" |
9 #include "third_party/skia/include/core/SkColor.h" | 11 #include "third_party/skia/include/core/SkColor.h" |
10 | 12 |
11 namespace ash { | 13 namespace ash { |
12 | 14 |
13 enum WallpaperLayout { | 15 enum WallpaperLayout { |
14 CENTER, | 16 CENTER, |
15 CENTER_CROPPED, | 17 CENTER_CROPPED, |
16 STRETCH, | 18 STRETCH, |
17 TILE, | 19 TILE, |
18 }; | 20 }; |
19 | 21 |
20 struct ASH_EXPORT WallpaperInfo { | 22 struct ASH_EXPORT WallpaperInfo { |
21 int id; | 23 int id; |
22 int thumb_id; | 24 int thumb_id; |
23 WallpaperLayout layout; | 25 WallpaperLayout layout; |
24 // TODO(bshe): author member should be encoded to UTF16. We need to use i18n | 26 // TODO(bshe): author member should be encoded to UTF16. We need to use i18n |
25 // string for this member after M19. | 27 // string for this member after M19. |
26 const char* author; | 28 const char* author; |
27 const char* website; | 29 const char* website; |
28 }; | 30 }; |
29 | 31 |
30 const SkColor kLoginWallpaperColor = 0xFEFEFE; | 32 const SkColor kLoginWallpaperColor = 0xFEFEFE; |
31 | 33 |
| 34 ASH_EXPORT WallpaperLayout GetLayoutFromString(std::string layout); |
32 ASH_EXPORT int GetDefaultWallpaperIndex(); | 35 ASH_EXPORT int GetDefaultWallpaperIndex(); |
33 ASH_EXPORT int GetGuestWallpaperIndex(); | 36 ASH_EXPORT int GetGuestWallpaperIndex(); |
34 ASH_EXPORT int GetInvalidWallpaperIndex(); | 37 ASH_EXPORT int GetInvalidWallpaperIndex(); |
35 ASH_EXPORT int GetNextWallpaperIndex(int index); | 38 ASH_EXPORT int GetNextWallpaperIndex(int index); |
36 ASH_EXPORT int GetSolidColorIndex(); | 39 ASH_EXPORT int GetSolidColorIndex(); |
37 ASH_EXPORT int GetWallpaperCount(); | 40 ASH_EXPORT int GetWallpaperCount(); |
38 ASH_EXPORT const WallpaperInfo& GetWallpaperInfo(int index); | 41 ASH_EXPORT const WallpaperInfo& GetWallpaperInfo(int index); |
39 | 42 |
40 } // namespace ash | 43 } // namespace ash |
41 | 44 |
42 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_RESOURCES_H_ | 45 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_RESOURCES_H_ |
OLD | NEW |