Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_H_ | |
| 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/scoped_ptr.h" | |
| 10 #include "ui/views/controls/button/button.h" | |
| 11 #include "ui/views/controls/link_listener.h" | |
| 12 | |
| 13 class CredentialsItemView; | |
| 14 class ManagePasswordsBubbleModel; | |
| 15 | |
| 16 namespace autofill { | |
| 17 struct PasswordForm; | |
| 18 } | |
| 19 | |
| 20 namespace net { | |
| 21 class URLRequestContextGetter; | |
| 22 } | |
| 23 | |
| 24 namespace views { | |
| 25 class ImageButton; | |
| 26 class Link; | |
| 27 } | |
| 28 | |
| 29 // A custom view that represents one credential row. There are two states: | |
| 30 // * Present a credential to the user for management. | |
| 31 // * Offer the user the ability to undo a deletion action. | |
| 32 class ManageCredentialItemView : public views::View, | |
| 33 public views::ButtonListener, | |
| 34 public views::LinkListener { | |
| 35 public: | |
| 36 ManageCredentialItemView(ManagePasswordsBubbleModel* model, | |
| 37 const autofill::PasswordForm* password_form, | |
| 38 net::URLRequestContextGetter* request_context); | |
|
Mike West
2015/02/20 16:21:39
Why do we need the request context? Seems strange.
vasilii
2015/02/20 16:58:51
It's for requesting an avatar. I removed this para
| |
| 39 ~ManageCredentialItemView() override; | |
| 40 | |
| 41 private: | |
| 42 void Refresh(); | |
| 43 | |
| 44 // ButtonListener: | |
| 45 void ButtonPressed(views::Button* sender, const ui::Event& event) override; | |
| 46 | |
| 47 // LinkListener: | |
| 48 void LinkClicked(views::Link* source, int event_flags) override; | |
| 49 | |
| 50 scoped_ptr<CredentialsItemView> credential_button_; | |
| 51 views::ImageButton* delete_button_; | |
| 52 views::Link* undo_link_; | |
| 53 | |
| 54 ManagePasswordsBubbleModel* const model_; | |
| 55 bool form_deleted_; | |
| 56 | |
| 57 DISALLOW_COPY_AND_ASSIGN(ManageCredentialItemView); | |
| 58 }; | |
| 59 | |
| 60 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_MANAGE_CREDENTIAL_ITEM_VIEW_H_ | |
| OLD | NEW |