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

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

Issue 578593002: Password bubble: get rid of hardcodeded sizes for username and password. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: don't touch model Created 6 years, 3 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_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 "components/autofill/core/common/password_form.h" 8 #include "components/autofill/core/common/password_form.h"
9 #include "components/password_manager/core/common/password_manager_ui.h" 9 #include "components/password_manager/core/common/password_manager_ui.h"
10 #include "ui/views/view.h" 10 #include "ui/views/view.h"
11 11
12 class ManagePasswordsBubbleModel; 12 class ManagePasswordsBubbleModel;
13 13
14 // A custom view for credentials which allows the management of the specific 14 // A custom view for credentials which allows the management of the specific
15 // credentials. The view has three distinct states: 15 // credentials. The view has three distinct states:
16 // 16 //
17 // * Present credentials to the user which she may choose to save. 17 // * Present credentials to the user which she may choose to save.
18 // * Present already-saved credentials to the user for management. 18 // * Present already-saved credentials to the user for management.
19 // * Offer the user the ability to undo a deletion action. 19 // * Offer the user the ability to undo a deletion action.
20 // 20 //
21 // The ManagePasswordItemView serves as a container for a single view 21 // The ManagePasswordItemView serves as a container for a single view
22 // representing one of these states. 22 // representing one of these states.
23 class ManagePasswordItemView : public views::View { 23 class ManagePasswordItemView : public views::View {
24 public: 24 public:
25 ManagePasswordItemView( 25 ManagePasswordItemView(
26 ManagePasswordsBubbleModel* manage_passwords_bubble_model, 26 ManagePasswordsBubbleModel* manage_passwords_bubble_model,
27 autofill::PasswordForm password_form, 27 const autofill::PasswordForm& password_form,
28 password_manager::ui::PasswordItemPosition position); 28 password_manager::ui::PasswordItemPosition position);
29 29
30 private: 30 private:
31 class ManageView; 31 class ManageView;
32 class PendingView; 32 class PendingView;
33 class UndoView; 33 class UndoView;
34 34
35 virtual ~ManagePasswordItemView(); 35 virtual ~ManagePasswordItemView();
36 36
37 void NotifyClickedDelete(); 37 void NotifyClickedDelete();
38 void NotifyClickedUndo(); 38 void NotifyClickedUndo();
39 39
40 // Changes the views according to the state of |delete_password_|. 40 // Changes the views according to the state of |delete_password_|.
41 void Refresh(); 41 void Refresh();
42 42
43 ManagePasswordsBubbleModel* model_; 43 ManagePasswordsBubbleModel* model_;
44 autofill::PasswordForm password_form_; 44 autofill::PasswordForm password_form_;
45 bool delete_password_; 45 bool delete_password_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); 47 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView);
48 }; 48 };
49 49
50 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ 50 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698