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

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

Issue 221853003: Password bubble: Add a test for displayed password length. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
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 "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 ManagePasswordItemView( 22 ManagePasswordItemView(
23 ManagePasswordsBubbleModel* manage_passwords_bubble_model, 23 ManagePasswordsBubbleModel* manage_passwords_bubble_model,
24 autofill::PasswordForm password_form, 24 autofill::PasswordForm password_form,
25 int field_1_width, 25 int field_1_width,
26 int field_2_width); 26 int field_2_width);
27 27
28 static base::string16 GetPasswordDisplayString(
29 const base::string16& password);
30
31 private: 28 private:
32 enum ColumnSets { COLUMN_SET_SAVE = 0, COLUMN_SET_MANAGE = 1, }; 29 enum ColumnSets { COLUMN_SET_SAVE = 0, COLUMN_SET_MANAGE = 1, };
33 30
34 virtual ~ManagePasswordItemView(); 31 virtual ~ManagePasswordItemView();
35 32
36 // Build a two-label column set using the widths stored in |field_1_width_| 33 // Build a two-label column set using the widths stored in |field_1_width_|
37 // and |field_2_width_|. 34 // and |field_2_width_|.
38 void BuildColumnSet(views::GridLayout*, int column_set_id); 35 void BuildColumnSet(views::GridLayout*, int column_set_id);
39 36
40 // Changes the views according to the state of |delete_password_|. 37 // Changes the views according to the state of |delete_password_|.
(...skipping 20 matching lines...) Expand all
61 ManagePasswordsBubbleModel* manage_passwords_bubble_model_; 58 ManagePasswordsBubbleModel* manage_passwords_bubble_model_;
62 autofill::PasswordForm password_form_; 59 autofill::PasswordForm password_form_;
63 bool delete_password_; 60 bool delete_password_;
64 int field_1_width_; 61 int field_1_width_;
65 int field_2_width_; 62 int field_2_width_;
66 63
67 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); 64 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView);
68 }; 65 };
69 66
70 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ 67 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698