OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "third_party/skia/include/core/SkColor.h" | 10 #include "third_party/skia/include/core/SkColor.h" |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // image is scaled to fit |dst_width| and |dst_height|. | 87 // image is scaled to fit |dst_width| and |dst_height|. |
88 gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image, | 88 gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image, |
89 bool is_rectangle, | 89 bool is_rectangle, |
90 int dst_width, | 90 int dst_width, |
91 int dst_height); | 91 int dst_height); |
92 | 92 |
93 // Returns a bitmap with a couple of columns shaved off so it is more square, | 93 // Returns a bitmap with a couple of columns shaved off so it is more square, |
94 // so that when resized to a square aspect ratio it looks pretty. | 94 // so that when resized to a square aspect ratio it looks pretty. |
95 SkBitmap GetAvatarIconAsSquare(const SkBitmap& source_bitmap, int scale_factor); | 95 SkBitmap GetAvatarIconAsSquare(const SkBitmap& source_bitmap, int scale_factor); |
96 | 96 |
| 97 // Sets |image| to the avatar corresponding to the profile at |profile_path| and |
| 98 // sets |is_rectangle| to true unless |image| is a built-in profile avatar. For |
| 99 // built-in profile avatars, always return the non-high res version. |
| 100 void GetTransparentBackgroundProfileAvatar(const base::FilePath& profile_path, |
| 101 gfx::Image* image, |
| 102 bool* is_rectangle); |
| 103 |
97 } // namespace profiles | 104 } // namespace profiles |
98 | 105 |
99 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ | 106 #endif // CHROME_BROWSER_PROFILES_PROFILE_AVATAR_ICON_UTIL_H_ |
OLD | NEW |