| 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 |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 views::Link* undo_link_; | 67 views::Link* undo_link_; |
| 68 | 68 |
| 69 ManagePasswordItemView* parent_; | 69 ManagePasswordItemView* parent_; |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 enum Position { FIRST_ITEM, SUBSEQUENT_ITEM }; | 72 enum Position { FIRST_ITEM, SUBSEQUENT_ITEM }; |
| 73 | 73 |
| 74 ManagePasswordItemView( | 74 ManagePasswordItemView( |
| 75 ManagePasswordsBubbleModel* manage_passwords_bubble_model, | 75 ManagePasswordsBubbleModel* manage_passwords_bubble_model, |
| 76 autofill::PasswordForm password_form, | 76 autofill::PasswordForm password_form, |
| 77 int field_1_width, | |
| 78 int field_2_width, | |
| 79 Position position); | 77 Position position); |
| 80 | 78 |
| 81 private: | 79 private: |
| 82 enum ColumnSets { TWO_COLUMN_SET = 0, THREE_COLUMN_SET }; | 80 enum ColumnSets { TWO_COLUMN_SET = 0, THREE_COLUMN_SET }; |
| 83 | 81 |
| 84 virtual ~ManagePasswordItemView(); | 82 virtual ~ManagePasswordItemView(); |
| 85 | 83 |
| 86 views::Label* GenerateUsernameLabel() const; | 84 views::Label* GenerateUsernameLabel() const; |
| 87 views::Label* GeneratePasswordLabel() const; | 85 views::Label* GeneratePasswordLabel() const; |
| 88 | 86 |
| 89 // Build a two-label column set using the widths stored in |field_1_width_| | 87 // Build a two-label column set. |
| 90 // and |field_2_width_|. | |
| 91 void BuildColumnSet(views::GridLayout*, int column_set_id); | 88 void BuildColumnSet(views::GridLayout*, int column_set_id); |
| 92 | 89 |
| 93 void NotifyClickedDelete(); | 90 void NotifyClickedDelete(); |
| 94 void NotifyClickedUndo(); | 91 void NotifyClickedUndo(); |
| 95 | 92 |
| 96 // Changes the views according to the state of |delete_password_|. | 93 // Changes the views according to the state of |delete_password_|. |
| 97 void Refresh(); | 94 void Refresh(); |
| 98 | 95 |
| 99 ManagePasswordsBubbleModel* manage_passwords_bubble_model_; | 96 ManagePasswordsBubbleModel* manage_passwords_bubble_model_; |
| 100 autofill::PasswordForm password_form_; | 97 autofill::PasswordForm password_form_; |
| 101 bool delete_password_; | 98 bool delete_password_; |
| 102 int field_1_width_; | |
| 103 int field_2_width_; | |
| 104 | 99 |
| 105 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); | 100 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); |
| 106 }; | 101 }; |
| 107 | 102 |
| 108 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ | 103 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ |
| OLD | NEW |