OLD | NEW |
---|---|
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 "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 | 9 |
10 namespace gfx { | 10 namespace gfx { |
11 class ImageSkia; | 11 class ImageSkia; |
12 class Range; | 12 class Range; |
13 } // namespace gfx | 13 } // namespace gfx |
14 | 14 |
15 class GURL; | 15 class GURL; |
16 | 16 |
17 // The desired width and height in pixels for an account avatar. | 17 // The desired width and height in pixels for an account avatar. |
18 extern const int kAvatarImageSize; | 18 extern const int kAvatarImageSize; |
19 | 19 |
20 // Crops and scales |image_skia| to the desired size for an account avatar. | 20 // Crops and scales |image_skia| to the desired size for an account avatar. |
21 gfx::ImageSkia ScaleImageForAccountAvatar(gfx::ImageSkia image_skia); | 21 gfx::ImageSkia ScaleImageForAccountAvatar(gfx::ImageSkia image_skia); |
22 | 22 |
23 // Sets the formatted |title| in the Save Password bubble. If the registry | 23 // Sets the formatted |title| in the Save Password bubble. If the registry |
24 // controlled domain of |user_visible_url| (i.e. the one seen in the omnibox) | 24 // controlled domain of |user_visible_url| (i.e. the one seen in the omnibox) |
25 // differs from the registry controlled domain of |form_origin_url|, sets | 25 // differs from the registry controlled domain of |form_origin_url|, sets |
26 // |IDS_SAVE_PASSWORD_TITLE| as the |title| so that it replaces "this site" in | 26 // |IDS_SAVE_PASSWORD_TITLE| as the |title| so that it replaces "this site" in |
vasilii
2015/07/23 15:15:13
the comment is obsolete.
dvadym
2015/07/24 16:42:39
I've changed the first phrase to: "Sets the format
| |
27 // title text with output of |FormatUrlForSecurityDisplay(form_origin_url)|. | 27 // title text with output of |FormatUrlForSecurityDisplay(form_origin_url)|. |
28 // Otherwise, sets |IDS_SAVE_PASSWORD| as the |title| having "this site". | 28 // Otherwise, sets |IDS_SAVE_PASSWORD| as the |title| having "this site". |
29 // If |is_smartlock_branding_enabled| is true, sets the |title_link_range| for | 29 // If |is_smartlock_branding_enabled| is true, sets the |title_link_range| for |
30 // the "Google Smart Lock" text range to be set visibly as a hyperlink in the | 30 // the "Google Smart Lock" text range to be set visibly as a hyperlink in the |
31 // dialog bubble. | 31 // dialog bubble. |
32 void GetSavePasswordDialogTitleTextAndLinkRange( | 32 void GetSavePasswordDialogTitleTextAndLinkRange( |
33 const GURL& user_visible_url, | 33 const GURL& user_visible_url, |
34 const GURL& form_origin_url, | 34 const GURL& form_origin_url, |
35 bool is_smartlock_branding_enabled, | 35 bool is_smartlock_branding_enabled, |
36 bool is_change_password, | |
36 base::string16* title, | 37 base::string16* title, |
37 gfx::Range* title_link_range); | 38 gfx::Range* title_link_range); |
38 | 39 |
39 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ | 40 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_VIEW_UTILS_H_ |
OLD | NEW |