OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef COMPONENTS_USER_MANAGER_USER_IMAGE_DEFAULT_USER_IMAGES_H_ | |
6 #define COMPONENTS_USER_MANAGER_USER_IMAGE_DEFAULT_USER_IMAGES_H_ | |
7 | |
8 #include <cstddef> // for size_t | |
9 #include <string> | |
10 | |
11 #include "base/strings/string16.h" | |
12 | |
13 namespace gfx { | |
14 class ImageSkia; | |
15 } | |
16 | |
17 namespace user_manager { | |
18 | |
19 // Returns URL to default user image with specified index. | |
20 std::string GetDefaultImageUrl(int index); | |
21 | |
22 // Checks if the given URL points to one of the default images. If it is, | |
23 // returns true and its index through |image_id|. If not, returns false. | |
24 bool IsDefaultImageUrl(const std::string& url, int* image_id); | |
25 | |
26 // Returns bitmap of default user image with specified index. | |
27 const gfx::ImageSkia& GetDefaultImage(int index); | |
28 | |
29 // Returns a description of a default user image with specified index. | |
30 base::string16 GetDefaultImageDescription(int index); | |
31 | |
32 // Resource IDs of default user images. | |
33 extern const int kDefaultImageResourceIDs[]; | |
34 | |
35 // String IDs of author names for default user images. | |
36 extern const int kDefaultImageAuthorIDs[]; | |
37 | |
38 // String IDs of websites for default user images. | |
39 extern const int kDefaultImageWebsiteIDs[]; | |
40 | |
41 // Number of default images. | |
42 extern const int kDefaultImagesCount; | |
43 | |
44 // The starting index of default images available for selection. Note that | |
45 // existing users may have images with smaller indices. | |
46 extern const int kFirstDefaultImageIndex; | |
47 | |
48 /// Histogram values. //////////////////////////////////////////////////////// | |
49 | |
50 // Histogram value for user image taken from file. | |
51 extern const int kHistogramImageFromFile; | |
52 | |
53 // Histogram value for user image taken from camera. | |
54 extern const int kHistogramImageFromCamera; | |
55 | |
56 // Histogram value a previously used image from camera/file. | |
57 extern const int kHistogramImageOld; | |
58 | |
59 // Histogram value for user image from G+ profile. | |
60 extern const int kHistogramImageFromProfile; | |
61 | |
62 // Histogram value for user video (animated avatar) from camera. | |
63 extern const int kHistogramVideoFromCamera; | |
64 | |
65 // Histogram value for user video from file. | |
66 extern const int kHistogramVideoFromFile; | |
67 | |
68 // Number of possible histogram values for user images. | |
69 extern const int kHistogramImagesCount; | |
70 | |
71 // Returns the histogram value corresponding to the given default image index. | |
72 int GetDefaultImageHistogramValue(int index); | |
73 | |
74 } // namespace user_manager | |
75 | |
76 #endif // COMPONENTS_USER_MANAGER_USER_IMAGE_DEFAULT_USER_IMAGES_H_ | |
OLD | NEW |