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 enum Position { FIRST_ITEM, MIDDLE_ITEM, LAST_ITEM }; | |
vabr (Chromium)
2014/04/02 08:38:52
LAST_ITEM does not seem to be used yet.
Do you hav
Mike West
2014/04/02 09:40:06
Yeah, not sure. I can drop it in this patch, but I
| |
23 | |
22 ManagePasswordItemView( | 24 ManagePasswordItemView( |
23 ManagePasswordsBubbleModel* manage_passwords_bubble_model, | 25 ManagePasswordsBubbleModel* manage_passwords_bubble_model, |
24 autofill::PasswordForm password_form, | 26 autofill::PasswordForm password_form, |
25 int field_1_width, | 27 int field_1_width, |
26 int field_2_width); | 28 int field_2_width, |
29 Position position); | |
27 | 30 |
28 static base::string16 GetPasswordDisplayString( | 31 static base::string16 GetPasswordDisplayString( |
29 const base::string16& password); | 32 const base::string16& password); |
30 | 33 |
31 private: | 34 private: |
32 enum ColumnSets { COLUMN_SET_SAVE = 0, COLUMN_SET_MANAGE = 1, }; | 35 enum ColumnSets { COLUMN_SET_SAVE = 0, COLUMN_SET_MANAGE = 1, }; |
33 | 36 |
34 virtual ~ManagePasswordItemView(); | 37 virtual ~ManagePasswordItemView(); |
35 | 38 |
36 // Build a two-label column set using the widths stored in |field_1_width_| | 39 // Build a two-label column set using the widths stored in |field_1_width_| |
(...skipping 24 matching lines...) Expand all Loading... | |
61 ManagePasswordsBubbleModel* manage_passwords_bubble_model_; | 64 ManagePasswordsBubbleModel* manage_passwords_bubble_model_; |
62 autofill::PasswordForm password_form_; | 65 autofill::PasswordForm password_form_; |
63 bool delete_password_; | 66 bool delete_password_; |
64 int field_1_width_; | 67 int field_1_width_; |
65 int field_2_width_; | 68 int field_2_width_; |
66 | 69 |
67 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); | 70 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); |
68 }; | 71 }; |
69 | 72 |
70 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ | 73 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ |
OLD | NEW |