| 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 #include "components/password_manager/core/common/password_manager_ui.h" |
| 10 | 11 |
| 11 class ManagePasswordsBubbleModel; | 12 class ManagePasswordsBubbleModel; |
| 12 | 13 |
| 13 namespace views { | 14 namespace views { |
| 14 class GridLayout; | 15 class GridLayout; |
| 15 class ImageButton; | 16 class ImageButton; |
| 16 } | 17 } |
| 17 | 18 |
| 18 // A custom view for credentials which allows the management of the specific | 19 // A custom view for credentials which allows the management of the specific |
| 19 // credentials. The view has three distinct states: | 20 // credentials. The view has three distinct states: |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 private: | 61 private: |
| 61 virtual ~UndoView(); | 62 virtual ~UndoView(); |
| 62 | 63 |
| 63 // views::LinkListener: | 64 // views::LinkListener: |
| 64 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; | 65 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; |
| 65 | 66 |
| 66 views::Link* undo_link_; | 67 views::Link* undo_link_; |
| 67 ManagePasswordItemView* parent_; | 68 ManagePasswordItemView* parent_; |
| 68 }; | 69 }; |
| 69 | 70 |
| 70 enum Position { FIRST_ITEM, SUBSEQUENT_ITEM }; | |
| 71 | |
| 72 ManagePasswordItemView( | 71 ManagePasswordItemView( |
| 73 ManagePasswordsBubbleModel* manage_passwords_bubble_model, | 72 ManagePasswordsBubbleModel* manage_passwords_bubble_model, |
| 74 autofill::PasswordForm password_form, | 73 autofill::PasswordForm password_form, |
| 75 Position position); | 74 password_manager::ui::PasswordItemPosition position); |
| 76 | 75 |
| 77 private: | 76 private: |
| 78 virtual ~ManagePasswordItemView(); | 77 virtual ~ManagePasswordItemView(); |
| 79 | 78 |
| 80 void NotifyClickedDelete(); | 79 void NotifyClickedDelete(); |
| 81 void NotifyClickedUndo(); | 80 void NotifyClickedUndo(); |
| 82 | 81 |
| 83 // Changes the views according to the state of |delete_password_|. | 82 // Changes the views according to the state of |delete_password_|. |
| 84 void Refresh(); | 83 void Refresh(); |
| 85 | 84 |
| 86 ManagePasswordsBubbleModel* model_; | 85 ManagePasswordsBubbleModel* model_; |
| 87 autofill::PasswordForm password_form_; | 86 autofill::PasswordForm password_form_; |
| 88 bool delete_password_; | 87 bool delete_password_; |
| 89 | 88 |
| 90 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); | 89 DISALLOW_COPY_AND_ASSIGN(ManagePasswordItemView); |
| 91 }; | 90 }; |
| 92 | 91 |
| 93 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ | 92 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_PASSWORD_ITEM_VIEW_H_ |
| OLD | NEW |