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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_view_utils.h

Issue 901493003: Extract some account chooser views things for cross-platform use. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace autofill { 10 namespace autofill {
11 struct PasswordForm; 11 struct PasswordForm;
12 } 12 } // namespace autofill
13
14 namespace gfx {
15 class ImageSkia;
16 } // namespace gfx
17
18 // The desired width and height in pixels for an account avatar.
19 extern const int kAvatarImageSize;
20
21 // Crops and scales |image_skia| to the desired size for an account avatar.
22 gfx::ImageSkia ScaleImageForAccountAvatar(gfx::ImageSkia image_skia);
13 23
14 // Returns the origin URI in a format which can be presented to a user based of 24 // Returns the origin URI in a format which can be presented to a user based of
15 // |password_from| field values. For web URIs |languages| is using in order to 25 // |password_from| field values. For web URIs |languages| is using in order to
16 // determine whether a URI is 'comprehensible' to a user who understands 26 // determine whether a URI is 'comprehensible' to a user who understands
17 // languages listed. 27 // languages listed.
18 std::string GetHumanReadableOrigin(const autofill::PasswordForm& password_form, 28 std::string GetHumanReadableOrigin(const autofill::PasswordForm& password_form,
19 const std::string& languages); 29 const std::string& languages);
20 30
21 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ 31 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/account_avatar_fetcher.cc ('k') | chrome/browser/ui/passwords/manage_passwords_view_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698