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

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

Issue 924733003: Credential Manager API pops up an auto-signin toast. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 years, 10 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 "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "chrome/browser/ui/passwords/account_avatar_fetcher.h" 10 #include "chrome/browser/ui/passwords/account_avatar_fetcher.h"
(...skipping 12 matching lines...) Expand all
23 namespace views { 23 namespace views {
24 class ImageView; 24 class ImageView;
25 class Label; 25 class Label;
26 } 26 }
27 27
28 // CredentialsItemView represents a credential view in the account chooser 28 // CredentialsItemView represents a credential view in the account chooser
29 // bubble. 29 // bubble.
30 class CredentialsItemView : public AccountAvatarFetcherDelegate, 30 class CredentialsItemView : public AccountAvatarFetcherDelegate,
31 public views::LabelButton { 31 public views::LabelButton {
32 public: 32 public:
33 enum Style {
34 ACCOUNT_CHOOSER,
35 AUTO_SIGNIN,
36 };
37
33 CredentialsItemView(views::ButtonListener* button_listener, 38 CredentialsItemView(views::ButtonListener* button_listener,
34 const autofill::PasswordForm& form, 39 const autofill::PasswordForm& form,
35 password_manager::CredentialType credential_type, 40 password_manager::CredentialType credential_type,
41 Style style,
36 net::URLRequestContextGetter* request_context); 42 net::URLRequestContextGetter* request_context);
37 ~CredentialsItemView() override; 43 ~CredentialsItemView() override;
38 44
39 const autofill::PasswordForm& form() const { return form_; } 45 const autofill::PasswordForm& form() const { return form_; }
40 password_manager::CredentialType credential_type() const { 46 password_manager::CredentialType credential_type() const {
41 return credential_type_; 47 return credential_type_;
42 } 48 }
43 49
44 // AccountAvatarFetcherDelegate: 50 // AccountAvatarFetcherDelegate:
45 void UpdateAvatar(const gfx::ImageSkia& image) override; 51 void UpdateAvatar(const gfx::ImageSkia& image) override;
(...skipping 10 matching lines...) Expand all
56 views::ImageView* image_view_; 62 views::ImageView* image_view_;
57 views::Label* upper_label_; 63 views::Label* upper_label_;
58 views::Label* lower_label_; 64 views::Label* lower_label_;
59 65
60 base::WeakPtrFactory<CredentialsItemView> weak_ptr_factory_; 66 base::WeakPtrFactory<CredentialsItemView> weak_ptr_factory_;
61 67
62 DISALLOW_COPY_AND_ASSIGN(CredentialsItemView); 68 DISALLOW_COPY_AND_ASSIGN(CredentialsItemView);
63 }; 69 };
64 70
65 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_ITEM_VIEW_H_ 71 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_ITEM_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698