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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_password_items_view.h

Issue 2960843002: Edit button makes username editable in the password manager bubble. (Closed)
Patch Set: Minor fixes. Created 3 years, 5 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 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_ITEMS_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEMS_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEMS_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEMS_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "components/autofill/core/common/password_form.h" 12 #include "components/autofill/core/common/password_form.h"
13 #include "ui/views/controls/label.h"
14 #include "ui/views/controls/textfield/textfield.h"
vasilii 2017/07/03 17:15:31 Label and Textfield can be just forward declared.
vasilii 2017/07/06 13:46:42 Not addressed.
irmakk 2017/07/06 14:19:12 Done.
13 #include "ui/views/view.h" 15 #include "ui/views/view.h"
14 16
15 class ManagePasswordsBubbleModel; 17 class ManagePasswordsBubbleModel;
16 18
19 // Standalone functions for creating username and password views.
20 std::unique_ptr<views::Label> GenerateUsernameLabel(
21 const autofill::PasswordForm& form);
22 std::unique_ptr<views::Label> GeneratePasswordLabel(
23 const autofill::PasswordForm& form);
24 std::unique_ptr<views::Textfield> GenerateUsernameEditable(
25 const autofill::PasswordForm& form);
26
17 // A custom view of individual credentials. The view is represented as a table 27 // A custom view of individual credentials. The view is represented as a table
18 // where each row can be in three distinct states: 28 // where each row can be in three distinct states:
19 // 29 //
20 // * Present credentials the user may choose to save. 30 // * Present credentials the user may choose to save.
vasilii 2017/07/03 17:15:31 Obsolete
irmakk 2017/07/06 14:19:12 Done.
21 // * Present already-saved credentials to the user for management. 31 // * Present already-saved credentials to the user for management.
22 // * Offer the user the ability to undo a deletion action. 32 // * Offer the user the ability to undo a deletion action.
23 class ManagePasswordItemsView : public views::View { 33 class ManagePasswordItemsView : public views::View {
24 public: 34 public:
25 ManagePasswordItemsView( 35 ManagePasswordItemsView(
26 ManagePasswordsBubbleModel* manage_passwords_bubble_model, 36 ManagePasswordsBubbleModel* manage_passwords_bubble_model,
27 const std::vector<autofill::PasswordForm>* password_forms); 37 const std::vector<autofill::PasswordForm>* password_forms);
28 ManagePasswordItemsView( 38 ManagePasswordItemsView(
29 ManagePasswordsBubbleModel* manage_passwords_bubble_model, 39 ManagePasswordsBubbleModel* manage_passwords_bubble_model,
30 const autofill::PasswordForm* password_form); 40 const autofill::PasswordForm* password_form);
vasilii 2017/07/03 17:15:31 I think this is not used anymore. Probably there i
irmakk 2017/07/06 14:19:12 This is still used in the Update Pending View case
31 41
32 private: 42 private:
33 class PasswordFormRow; 43 class PasswordFormRow;
34 44
35 ~ManagePasswordItemsView() override; 45 ~ManagePasswordItemsView() override;
36 46
37 void AddRows(); 47 void AddRows();
38 void NotifyPasswordFormStatusChanged( 48 void NotifyPasswordFormStatusChanged(
39 const autofill::PasswordForm& password_form, bool deleted); 49 const autofill::PasswordForm& password_form, bool deleted);
40 50
41 // Changes the views according to the state of |password_forms_rows_|. 51 // Changes the views according to the state of |password_forms_rows_|.
42 void Refresh(); 52 void Refresh();
43 53
44 std::vector<std::unique_ptr<PasswordFormRow>> password_forms_rows_; 54 std::vector<std::unique_ptr<PasswordFormRow>> password_forms_rows_;
45 ManagePasswordsBubbleModel* model_; 55 ManagePasswordsBubbleModel* model_;
46 56
47 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemsView); 57 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemsView);
48 }; 58 };
49 59
50 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEMS_VIEW_H_ 60 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEMS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698