| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 8 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
| 9 #include "components/autofill/core/common/password_form.h" | 9 #include "components/autofill/core/common/password_form.h" |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 class GridLayout; | 12 class GridLayout; |
| 13 class ImageButton; | 13 class ImageButton; |
| 14 } | 14 } |
| 15 | 15 |
| 16 // A custom view for credentials which allows the management of the specific | 16 // A custom view for credentials which allows the management of the specific |
| 17 // credentials. | 17 // credentials. |
| 18 class ManagePasswordItemView : public views::View, | 18 class ManagePasswordItemView : public views::View, |
| 19 public views::ButtonListener, | 19 public views::ButtonListener, |
| 20 public views::LinkListener { | 20 public views::LinkListener { |
| 21 public: | 21 public: |
| 22 ManagePasswordItemView( | 22 ManagePasswordItemView( |
| 23 ManagePasswordsBubbleModel* manage_passwords_bubble_model, | 23 ManagePasswordsBubbleModel* manage_passwords_bubble_model, |
| 24 autofill::PasswordForm password_form, | 24 autofill::PasswordForm password_form, |
| 25 int field_1_width, | 25 int field_1_width, |
| 26 int field_2_width); | 26 int field_2_width); |
| 27 | 27 |
| 28 static base::string16 GetPasswordDisplayString( | 28 // Returns a 15-character long string of bullet characters, representative |
| 29 const base::string16& password); | 29 // of a hidden password. |
| 30 static base::string16 GetPasswordDisplayString(); |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 enum ColumnSets { COLUMN_SET_SAVE = 0, COLUMN_SET_MANAGE = 1, }; | 33 enum ColumnSets { COLUMN_SET_SAVE = 0, COLUMN_SET_MANAGE = 1, }; |
| 33 | 34 |
| 34 virtual ~ManagePasswordItemView(); | 35 virtual ~ManagePasswordItemView(); |
| 35 | 36 |
| 36 // Build a two-label column set using the widths stored in |field_1_width_| | 37 // Build a two-label column set using the widths stored in |field_1_width_| |
| 37 // and |field_2_width_|. | 38 // and |field_2_width_|. |
| 38 void BuildColumnSet(views::GridLayout*, int column_set_id); | 39 void BuildColumnSet(views::GridLayout*, int column_set_id); |
| 39 | 40 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 61 ManagePasswordsBubbleModel* manage_passwords_bubble_model_; | 62 ManagePasswordsBubbleModel* manage_passwords_bubble_model_; |
| 62 autofill::PasswordForm password_form_; | 63 autofill::PasswordForm password_form_; |
| 63 bool delete_password_; | 64 bool delete_password_; |
| 64 int field_1_width_; | 65 int field_1_width_; |
| 65 int field_2_width_; | 66 int field_2_width_; |
| 66 | 67 |
| 67 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); | 68 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ | 71 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ |
| OLD | NEW |