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 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_ 7 8 #include "ui/gfx/image/image.h" 9 10 namespace profiles { 11 12 extern const int kAvatarIconWidth; 13 extern const int kAvatarIconHeight; 14 extern const int kAvatarIconPadding; 15 16 // Returns a version of |image| of a specific size and with a grey border. 17 // Note that no checks are done on the width/height so make sure they're 18 // reasonable values; in the range of 16-256 is probably best. 19 gfx::Image GetSizedAvatarIconWithBorder(const gfx::Image& image, 20 bool is_rectangle, 21 int width, int height); 22 23 // Returns a version of |image| suitable for use in menus. 24 gfx::Image GetAvatarIconForMenu(const gfx::Image& image, 25 bool is_rectangle); 26 27 // Returns a version of |image| suitable for use in WebUI. 28 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, 29 bool is_rectangle); 30 31 // Returns a version of |image| suitable for use in title bars. The returned 32 // image is scaled to fit |dst_width| and |dst_height|. 33 gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image, 34 bool is_rectangle, 35 int dst_width, 36 int dst_height); 37 38 } // namespace profiles 39 40 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_ 41