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

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

Issue 2808823002: MacViews: Allows the toolkit-views Manage Passwords Dialog to be used (Closed)
Patch Set: MacViews: Allows the toolkit-views Manage Passwords Dialog to be used Created 3 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
OLDNEW
(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 #ifndef CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_SELECTION_VIEW_H_
5 #define CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_SELECTION_VIEW_H_
6
7 #include <memory>
8 #include <vector>
9
10 #include "base/macros.h"
11 #include "components/autofill/core/common/password_form.h"
12 #include "ui/views/view.h"
13
14 namespace views {
15 class Combobox;
16 }
17
18 namespace ui {
19 class SimpleComboboxModel;
20 }
21
22 class ManagePasswordsBubbleModel;
23
24 // A view where the user can select a credential.
25 class CredentialsSelectionView : public views::View {
26 public:
27 explicit CredentialsSelectionView(
28 ManagePasswordsBubbleModel* manage_passwords_bubble_model);
29 ~CredentialsSelectionView() override;
30
31 // This methods also reports a user action.
32 const autofill::PasswordForm* GetSelectedCredentials();
33
34 private:
35 void GenerateUsernameCombobox(const base::string16& best_matched_username);
36 void ReportUserActionOnce(bool was_update_rejected, int selected_index);
37
38 const std::vector<autofill::PasswordForm>* password_forms_;
39 std::unique_ptr<views::Combobox> combobox_;
40 std::unique_ptr<ui::SimpleComboboxModel> combobox_model_;
41 int default_index_;
42 bool is_default_best_match_;
43 bool is_default_preferred_;
44 bool action_reported_;
45
46 DISALLOW_COPY_AND_ASSIGN(CredentialsSelectionView);
47 };
48
49 #endif // CHROME_BROWSER_UI_VIEWS_PASSWORDS_CREDENTIALS_SELECTION_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698