| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/crypto_module_password_dialog_view.h" | 5 #include "chrome/browser/ui/views/crypto_module_password_dialog_view.h" |
| 6 | 6 |
| 7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
| 8 #include "grit/generated_resources.h" | 8 #include "grit/generated_resources.h" |
| 9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
| 10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 break; | 114 break; |
| 115 default: | 115 default: |
| 116 NOTREACHED(); | 116 NOTREACHED(); |
| 117 } | 117 } |
| 118 reason_label_ = new views::Label(base::UTF8ToUTF16(text)); | 118 reason_label_ = new views::Label(base::UTF8ToUTF16(text)); |
| 119 reason_label_->SetMultiLine(true); | 119 reason_label_->SetMultiLine(true); |
| 120 | 120 |
| 121 password_label_ = new views::Label(l10n_util::GetStringUTF16( | 121 password_label_ = new views::Label(l10n_util::GetStringUTF16( |
| 122 IDS_CRYPTO_MODULE_AUTH_DIALOG_PASSWORD_FIELD)); | 122 IDS_CRYPTO_MODULE_AUTH_DIALOG_PASSWORD_FIELD)); |
| 123 | 123 |
| 124 password_entry_ = new views::Textfield(views::Textfield::STYLE_OBSCURED); | 124 password_entry_ = new views::Textfield(); |
| 125 password_entry_->SetController(this); | 125 password_entry_->SetTextInputType(ui::TEXT_INPUT_TYPE_PASSWORD); |
| 126 password_entry_->set_controller(this); |
| 126 | 127 |
| 127 views::GridLayout* layout = views::GridLayout::CreatePanel(this); | 128 views::GridLayout* layout = views::GridLayout::CreatePanel(this); |
| 128 SetLayoutManager(layout); | 129 SetLayoutManager(layout); |
| 129 | 130 |
| 130 views::ColumnSet* reason_column_set = layout->AddColumnSet(0); | 131 views::ColumnSet* reason_column_set = layout->AddColumnSet(0); |
| 131 reason_column_set->AddColumn( | 132 reason_column_set->AddColumn( |
| 132 views::GridLayout::LEADING, views::GridLayout::LEADING, 1, | 133 views::GridLayout::LEADING, views::GridLayout::LEADING, 1, |
| 133 views::GridLayout::USE_PREF, 0, 0); | 134 views::GridLayout::USE_PREF, 0, 0); |
| 134 | 135 |
| 135 views::ColumnSet* column_set = layout->AddColumnSet(1); | 136 views::ColumnSet* column_set = layout->AddColumnSet(1); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 156 CryptoModulePasswordReason reason, | 157 CryptoModulePasswordReason reason, |
| 157 const std::string& hostname, | 158 const std::string& hostname, |
| 158 gfx::NativeWindow parent, | 159 gfx::NativeWindow parent, |
| 159 const CryptoModulePasswordCallback& callback) { | 160 const CryptoModulePasswordCallback& callback) { |
| 160 CryptoModulePasswordDialogView* dialog = | 161 CryptoModulePasswordDialogView* dialog = |
| 161 new CryptoModulePasswordDialogView(slot_name, reason, hostname, callback); | 162 new CryptoModulePasswordDialogView(slot_name, reason, hostname, callback); |
| 162 views::DialogDelegate::CreateDialogWidget(dialog, NULL, parent)->Show(); | 163 views::DialogDelegate::CreateDialogWidget(dialog, NULL, parent)->Show(); |
| 163 } | 164 } |
| 164 | 165 |
| 165 } // namespace chrome | 166 } // namespace chrome |
| OLD | NEW |