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

Side by Side Diff: ash/desktop_background/desktop_background_resources.h

Issue 10837089: Use low resolution wallpaper for small screens. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Please review this patch Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
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> 8 #include <string>
9 9
10 #include "ash/ash_export.h" 10 #include "ash/ash_export.h"
11 #include "third_party/skia/include/core/SkColor.h" 11 #include "third_party/skia/include/core/SkColor.h"
12 12
13 namespace ash { 13 namespace ash {
14 14
15 enum WallpaperLayout { 15 enum WallpaperLayout {
16 CENTER, 16 CENTER,
17 CENTER_CROPPED, 17 CENTER_CROPPED,
18 STRETCH, 18 STRETCH,
19 TILE, 19 TILE,
20 }; 20 };
21 21
22 enum WallpaperResolution {
23 LARGE,
24 MEDIUM,
Emmanuel Saint-loubert-Bié 2012/08/03 14:28:26 nit: since this is not used yet, maybe we should r
bshe 2012/08/03 15:01:33 Done.
25 SMALL
26 };
27
28 // Encapsulates wallpaper infomation needed by desktop background view.
29 struct ASH_EXPORT WallpaperViewInfo {
30 int id;
31 WallpaperLayout layout;
32 };
33
22 struct ASH_EXPORT WallpaperInfo { 34 struct ASH_EXPORT WallpaperInfo {
23 int id; 35 WallpaperViewInfo large;
36 WallpaperViewInfo small;
24 int thumb_id; 37 int thumb_id;
25 WallpaperLayout layout;
26 // TODO(bshe): author member should be encoded to UTF16. We need to use i18n 38 // TODO(bshe): author member should be encoded to UTF16. We need to use i18n
27 // string for this member after M19. 39 // string for this member after M19.
28 const char* author; 40 const char* author;
29 const char* website; 41 const char* website;
30 }; 42 };
31 43
32 const SkColor kLoginWallpaperColor = 0xFEFEFE; 44 const SkColor kLoginWallpaperColor = 0xFEFEFE;
33 45
34 ASH_EXPORT int GetDefaultWallpaperIndex(); 46 ASH_EXPORT int GetDefaultWallpaperIndex();
35 ASH_EXPORT int GetGuestWallpaperIndex(); 47 ASH_EXPORT int GetGuestWallpaperIndex();
36 ASH_EXPORT int GetInvalidWallpaperIndex(); 48 ASH_EXPORT int GetInvalidWallpaperIndex();
37 ASH_EXPORT WallpaperLayout GetLayoutEnum(const std::string& layout); 49 ASH_EXPORT WallpaperLayout GetLayoutEnum(const std::string& layout);
38 ASH_EXPORT int GetNextWallpaperIndex(int index); 50 ASH_EXPORT int GetNextWallpaperIndex(int index);
39 ASH_EXPORT int GetSolidColorIndex(); 51 ASH_EXPORT int GetSolidColorIndex();
40 ASH_EXPORT int GetWallpaperCount(); 52 ASH_EXPORT int GetWallpaperCount();
41 ASH_EXPORT const WallpaperInfo& GetWallpaperInfo(int index); 53 ASH_EXPORT const WallpaperInfo& GetWallpaperInfo(int index);
54 ASH_EXPORT const WallpaperViewInfo& GetWallpaperViewInfo(int index,
55 WallpaperResolution resolution);
42 56
43 } // namespace ash 57 } // namespace ash
44 58
45 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_RESOURCES_H_ 59 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_RESOURCES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698