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

Unified 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: Merge with ToT Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/passwords/manage_password_items_view.h
diff --git a/chrome/browser/ui/views/passwords/manage_password_items_view.h b/chrome/browser/ui/views/passwords/manage_password_items_view.h
index 66c5819a23123e1c83c2370d635f8417f1f1323a..8b0ca017a53439d2af55a014c5b55af58e57a664 100644
--- a/chrome/browser/ui/views/passwords/manage_password_items_view.h
+++ b/chrome/browser/ui/views/passwords/manage_password_items_view.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "components/autofill/core/common/password_form.h"
+#include "ui/views/focus/focus_manager.h"
vasilii 2017/06/30 15:28:06 Seems like it's not used in the header?
irmakk 2017/07/03 14:56:54 Done.
#include "ui/views/view.h"
class ManagePasswordsBubbleModel;
@@ -22,18 +23,28 @@ class ManagePasswordsBubbleModel;
// * Offer the user the ability to undo a deletion action.
class ManagePasswordItemsView : public views::View {
public:
+ class ManagePasswordItemsDelegate {
vasilii 2017/06/30 15:28:06 I'd declare it outside of this class because it's
+ public:
+ virtual void FocusedOnEditable() = 0;
+ virtual void FocusLostOnEditable() = 0;
+ };
+ enum RowStatus { DEFAULT, DELETED, EDITING };
vasilii 2017/06/30 15:28:07 "DEFAULT" isn't clear. I don't understand if it's
ManagePasswordItemsView(
ManagePasswordsBubbleModel* manage_passwords_bubble_model,
const std::vector<autofill::PasswordForm>* password_forms);
ManagePasswordItemsView(
ManagePasswordsBubbleModel* manage_passwords_bubble_model,
- const autofill::PasswordForm* password_form);
+ const autofill::PasswordForm* password_form,
+ ManagePasswordItemsDelegate* manage_password_items_delegate = nullptr);
vasilii 2017/06/30 15:28:06 I don't think we win anything with the default arg
irmakk 2017/07/03 14:56:54 This constructor is also used for the update pendi
+ void SetRowStatusForPendingViewRow(RowStatus row_status);
vasilii 2017/06/30 15:28:07 A blank line before please.
irmakk 2017/07/03 14:56:54 Done.
private:
class PasswordFormRow;
~ManagePasswordItemsView() override;
+ bool OnKeyPressed(const ui::KeyEvent& event) override;
vasilii 2017/06/30 15:28:06 Add a comment // View:
irmakk 2017/07/03 14:56:54 Done.
+
void AddRows();
void NotifyPasswordFormStatusChanged(
const autofill::PasswordForm& password_form, bool deleted);
@@ -43,6 +54,7 @@ class ManagePasswordItemsView : public views::View {
std::vector<std::unique_ptr<PasswordFormRow>> password_forms_rows_;
ManagePasswordsBubbleModel* model_;
+ ManagePasswordItemsDelegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemsView);
};

Powered by Google App Engine
This is Rietveld 408576698