Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: chrome/browser/profiles/profile_info_util.h

Issue 149513007: [Mac] The GAIA profile photo should be resized in the Users controller menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_ 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_
6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_ 6 #define CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_
7 7
8 #include "ui/gfx/image/image.h" 8 #include "ui/gfx/image/image.h"
9 9
10 namespace profiles { 10 namespace profiles {
11 11
12 extern const int kAvatarIconWidth; 12 extern const int kAvatarIconWidth;
13 extern const int kAvatarIconHeight; 13 extern const int kAvatarIconHeight;
14 extern const int kAvatarIconPadding; 14 extern const int kAvatarIconPadding;
15 15
16 // Return whether or not |image| needs to be resized to a suitable size
17 // as given by kAvatarIconWidth and kAvatarIconHeight.
18 bool AvatarIconNeedsResizing(const gfx::Image& image);
Alexei Svitkine (slow) 2014/01/29 20:23:56 I am guessing this is here because you're going to
noms (inactive) 2014/01/29 20:31:29 I don't really know where I would reuse it. There'
19
16 // Returns a version of |image| of a specific size and with a grey border. 20 // 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 21 // 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. 22 // reasonable values; in the range of 16-256 is probably best.
19 gfx::Image GetSizedAvatarIconWithBorder(const gfx::Image& image, 23 gfx::Image GetSizedAvatarIconWithBorder(const gfx::Image& image,
20 bool is_rectangle, 24 bool is_rectangle,
21 int width, int height); 25 int width, int height);
22 26
23 // Returns a version of |image| suitable for use in menus. 27 // Returns a version of |image| suitable for use in menus.
24 gfx::Image GetAvatarIconForMenu(const gfx::Image& image, 28 gfx::Image GetAvatarIconForMenu(const gfx::Image& image,
25 bool is_rectangle); 29 bool is_rectangle);
26 30
27 // Returns a version of |image| suitable for use in WebUI. 31 // Returns a version of |image| suitable for use in WebUI.
28 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image, 32 gfx::Image GetAvatarIconForWebUI(const gfx::Image& image,
29 bool is_rectangle); 33 bool is_rectangle);
30 34
31 // Returns a version of |image| suitable for use in title bars. The returned 35 // Returns a version of |image| suitable for use in title bars. The returned
32 // image is scaled to fit |dst_width| and |dst_height|. 36 // image is scaled to fit |dst_width| and |dst_height|.
33 gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image, 37 gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image,
34 bool is_rectangle, 38 bool is_rectangle,
35 int dst_width, 39 int dst_width,
36 int dst_height); 40 int dst_height);
37 41
38 } // namespace profiles 42 } // namespace profiles
39 43
40 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_ 44 #endif // CHROME_BROWSER_PROFILES_PROFILE_INFO_UTIL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_info_util.cc » ('j') | chrome/browser/ui/cocoa/profile_menu_controller.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698