OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 #include "chrome/browser/ui/views/passwords/credentials_selection_view.h" | 5 #include "chrome/browser/ui/views/passwords/credentials_selection_view.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 9 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
8 #include "ui/base/models/simple_combobox_model.h" | 10 #include "ui/base/models/simple_combobox_model.h" |
9 #include "ui/base/resource/resource_bundle.h" | 11 #include "ui/base/resource/resource_bundle.h" |
10 #include "ui/views/controls/button/button.h" | 12 #include "ui/views/controls/button/button.h" |
11 #include "ui/views/controls/combobox/combobox.h" | 13 #include "ui/views/controls/combobox/combobox.h" |
12 #include "ui/views/controls/label.h" | 14 #include "ui/views/controls/label.h" |
13 #include "ui/views/layout/grid_layout.h" | 15 #include "ui/views/layout/grid_layout.h" |
14 #include "ui/views/layout/layout_constants.h" | 16 #include "ui/views/layout/layout_constants.h" |
15 | 17 |
16 namespace { | 18 namespace { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 89 |
88 GetLayoutManager()->Layout(this); | 90 GetLayoutManager()->Layout(this); |
89 } | 91 } |
90 | 92 |
91 const autofill::PasswordForm* | 93 const autofill::PasswordForm* |
92 CredentialsSelectionView::GetSelectedCredentials() { | 94 CredentialsSelectionView::GetSelectedCredentials() { |
93 DCHECK_EQ(password_forms_.size(), | 95 DCHECK_EQ(password_forms_.size(), |
94 static_cast<size_t>(combobox_->model()->GetItemCount())); | 96 static_cast<size_t>(combobox_->model()->GetItemCount())); |
95 return password_forms_[combobox_->selected_index()]; | 97 return password_forms_[combobox_->selected_index()]; |
96 } | 98 } |
OLD | NEW |