Disable view source for Developer Tools.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / default_user_images.h
blob9eec792daf96d507ddcbf12ac84521ee1cc2e9ed
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_DEFAULT_USER_IMAGES_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_DEFAULT_USER_IMAGES_H_
8 #include <cstddef> // for size_t
9 #include <string>
11 #include "base/strings/string16.h"
13 namespace gfx {
14 class ImageSkia;
17 namespace chromeos {
19 // Returns path to default user image with specified index.
20 // The path is used in Local State to distinguish default images.
21 // This function is obsolete and is preserved only for compatibility with older
22 // profiles which don't user separate image index and path.
23 std::string GetDefaultImagePath(int index);
25 // Checks if given path is one of the default ones. If it is, returns true
26 // and its index through |image_id|. If not, returns false.
27 bool IsDefaultImagePath(const std::string& path, int* image_id);
29 // Returns URL to default user image with specified index.
30 std::string GetDefaultImageUrl(int index);
32 // Checks if the given URL points to one of the default images. If it is,
33 // returns true and its index through |image_id|. If not, returns false.
34 bool IsDefaultImageUrl(const std::string& url, int* image_id);
36 // Returns bitmap of default user image with specified index.
37 const gfx::ImageSkia& GetDefaultImage(int index);
39 // Returns a description of a default user image with specified index.
40 base::string16 GetDefaultImageDescription(int index);
42 // Resource IDs of default user images.
43 extern const int kDefaultImageResourceIDs[];
45 // String IDs of author names for default user images.
46 extern const int kDefaultImageAuthorIDs[];
48 // String IDs of websites for default user images.
49 extern const int kDefaultImageWebsiteIDs[];
51 // Number of default images.
52 extern const int kDefaultImagesCount;
54 // The starting index of default images available for selection. Note that
55 // existing users may have images with smaller indices.
56 extern const int kFirstDefaultImageIndex;
58 /// Histogram values. ////////////////////////////////////////////////////////
60 // Histogram value for user image taken from file.
61 extern const int kHistogramImageFromFile;
63 // Histogram value for user image taken from camera.
64 extern const int kHistogramImageFromCamera;
66 // Histogram value a previously used image from camera/file.
67 extern const int kHistogramImageOld;
69 // Histogram value for user image from G+ profile.
70 extern const int kHistogramImageFromProfile;
72 // Histogram value for user video (animated avatar) from camera.
73 extern const int kHistogramVideoFromCamera;
75 // Histogram value for user video from file.
76 extern const int kHistogramVideoFromFile;
78 // Number of possible histogram values for user images.
79 extern const int kHistogramImagesCount;
81 // Returns the histogram value corresponding to the given default image index.
82 int GetDefaultImageHistogramValue(int index);
84 } // namespace chromeos
86 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_DEFAULT_USER_IMAGES_H_