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

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

Issue 848723002: Credential Manager API: Showing both local and federated logins. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Not ready for review Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_CREDENTIALS_ITEM_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_ITEM_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_ITEM_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_ITEM_VIEW_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/autofill/core/common/password_form.h" 9 #include "components/autofill/core/common/password_form.h"
10 #include "components/password_manager/content/common/credential_manager_types.h"
10 #include "ui/views/controls/button/label_button.h" 11 #include "ui/views/controls/button/label_button.h"
11 12
12 namespace views { 13 namespace views {
13 class ImageView; 14 class ImageView;
14 class Label; 15 class Label;
15 } 16 }
16 17
17 // CredentialsItemView represents a credential view in the account chooser 18 // CredentialsItemView represents a credential view in the account chooser
18 // bubble. 19 // bubble.
19 class CredentialsItemView : public views::LabelButton { 20 class CredentialsItemView : public views::LabelButton {
20 public: 21 public:
21 CredentialsItemView(views::ButtonListener* button_listener, 22 CredentialsItemView(views::ButtonListener* button_listener,
22 const autofill::PasswordForm& form); 23 const autofill::PasswordForm& form,
24 password_manager::CredentialType credential_type);
23 ~CredentialsItemView() override; 25 ~CredentialsItemView() override;
24 26
25 const autofill::PasswordForm& form() const { return form_; } 27 const autofill::PasswordForm& form() const { return form_; }
28 password_manager::CredentialType credential_type() const {
29 return credential_type_;
30 }
26 31
27 private: 32 private:
28 // views::LabelButton: 33 // views::LabelButton:
29 gfx::Size GetPreferredSize() const override; 34 gfx::Size GetPreferredSize() const override;
30 int GetHeightForWidth(int w) const override; 35 int GetHeightForWidth(int w) const override;
31 void Layout() override; 36 void Layout() override;
32 37
33 autofill::PasswordForm form_; 38 autofill::PasswordForm form_;
39 password_manager::CredentialType credential_type_;
34 40
35 views::ImageView* image_view_; 41 views::ImageView* image_view_;
36 views::Label* full_name_label_; 42 views::Label* full_name_label_;
37 views::Label* username_label_; 43 views::Label* username_label_;
38 44
39 DISALLOW_COPY_AND_ASSIGN(CredentialsItemView); 45 DISALLOW_COPY_AND_ASSIGN(CredentialsItemView);
40 }; 46 };
41 47
42 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_ITEM_VIEW_H_ 48 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_ITEM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698