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 #import "chrome/browser/ui/cocoa/passwords/credentials_selection_view.h" | 5 #import "chrome/browser/ui/cocoa/passwords/credentials_selection_view.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "chrome/browser/ui/chrome_style.h" | 9 #include "chrome/browser/ui/chrome_style.h" |
8 #import "chrome/browser/ui/cocoa/bubble_combobox.h" | 10 #import "chrome/browser/ui/cocoa/bubble_combobox.h" |
9 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h" | 11 #import "chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h" |
10 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" | 12 #include "chrome/browser/ui/passwords/manage_passwords_bubble_model.h" |
11 #include "ui/base/models/simple_combobox_model.h" | 13 #include "ui/base/models/simple_combobox_model.h" |
12 | 14 |
13 namespace { | 15 namespace { |
14 | 16 |
15 NSPopUpButton* CreateUsernamesPopUpButton( | 17 NSPopUpButton* CreateUsernamesPopUpButton( |
16 const std::vector<const autofill::PasswordForm*>& forms, | 18 const std::vector<const autofill::PasswordForm*>& forms, |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 return self; | 108 return self; |
107 } | 109 } |
108 | 110 |
109 - (const autofill::PasswordForm*)getSelectedCredentials { | 111 - (const autofill::PasswordForm*)getSelectedCredentials { |
110 int selected_index = [usernamePopUpButton_ indexOfSelectedItem]; | 112 int selected_index = [usernamePopUpButton_ indexOfSelectedItem]; |
111 CHECK(selected_index >= 0); | 113 CHECK(selected_index >= 0); |
112 return model_->local_credentials()[selected_index]; | 114 return model_->local_credentials()[selected_index]; |
113 } | 115 } |
114 | 116 |
115 @end | 117 @end |
OLD | NEW |