Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 5 #pragma once |
| 6 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_DEFAULT_USER_IMAGES_H_ | 6 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_DEFAULT_USER_IMAGES_H_ |
| 7 #define CHROME_BROWSER_CHROMEOS_LOGIN_DEFAULT_USER_IMAGES_H_ | 7 #define CHROME_BROWSER_CHROMEOS_LOGIN_DEFAULT_USER_IMAGES_H_ |
| 8 | 8 |
| 9 #include <cstddef> // for size_t | 9 #include <cstddef> // for size_t |
| 10 #include <string> | 10 #include <string> |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 // Returns URL to default user image with specified index. | 26 // Returns URL to default user image with specified index. |
| 27 std::string GetDefaultImageUrl(int index); | 27 std::string GetDefaultImageUrl(int index); |
| 28 | 28 |
| 29 // Checks if the given URL points to one of the default images. If it is, | 29 // Checks if the given URL points to one of the default images. If it is, |
| 30 // returns true and its index through |image_id|. If not, returns false. | 30 // returns true and its index through |image_id|. If not, returns false. |
| 31 bool IsDefaultImageUrl(const std::string url, int* image_id); | 31 bool IsDefaultImageUrl(const std::string url, int* image_id); |
| 32 | 32 |
| 33 // Returns bitmap of default user image with specified index. | 33 // Returns bitmap of default user image with specified index. |
| 34 const SkBitmap& GetDefaultImage(int index); | 34 const SkBitmap& GetDefaultImage(int index); |
| 35 | 35 |
| 36 // Returns a description of a default user image with specified index. | |
| 37 const std::string GetDefaultImageDescription(int index); | |
|
Ivan Korotkov
2012/05/04 17:02:27
No need in const
dmazzoni
2012/05/04 17:48:00
Done.
| |
| 38 | |
| 36 // Resource IDs of default user images. | 39 // Resource IDs of default user images. |
| 37 extern const int kDefaultImageResources[]; | 40 extern const int kDefaultImageResources[]; |
| 38 | 41 |
| 39 // Number of default images. | 42 // Number of default images. |
| 40 extern const int kDefaultImagesCount; | 43 extern const int kDefaultImagesCount; |
| 41 | 44 |
| 42 // Image index to be used in histograms when user image is taken from file. | 45 // Image index to be used in histograms when user image is taken from file. |
| 43 extern const int kHistogramImageFromFile; | 46 extern const int kHistogramImageFromFile; |
| 44 | 47 |
| 45 // Image index to be used in histograms when user image is taken from camera. | 48 // Image index to be used in histograms when user image is taken from camera. |
| 46 extern const int kHistogramImageFromCamera; | 49 extern const int kHistogramImageFromCamera; |
| 47 | 50 |
| 48 // Image index to be used in histograms when user selects a previously used | 51 // Image index to be used in histograms when user selects a previously used |
| 49 // image from camera/file. | 52 // image from camera/file. |
| 50 extern const int kHistogramImageOld; | 53 extern const int kHistogramImageOld; |
| 51 | 54 |
| 52 // Image index to be used in histograms when user image is taken from profile. | 55 // Image index to be used in histograms when user image is taken from profile. |
| 53 extern const int kHistogramImageFromProfile; | 56 extern const int kHistogramImageFromProfile; |
| 54 | 57 |
| 55 // Number of possible user image indices to be used in histograms. | 58 // Number of possible user image indices to be used in histograms. |
| 56 extern const int kHistogramImagesCount; | 59 extern const int kHistogramImagesCount; |
| 57 | 60 |
| 58 } // namespace chromeos | 61 } // namespace chromeos |
| 59 | 62 |
| 60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_DEFAULT_USER_IMAGES_H_ | 63 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_DEFAULT_USER_IMAGES_H_ |
| OLD | NEW |