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

Side by Side Diff: chrome/browser/ui/views/crypto_module_password_dialog_view.cc

Issue 138363004: Views Textfield fixes and cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync and rebase. Created 6 years, 11 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 | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc ('k') | chrome/browser/ui/views/edit_search_engine_dialog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698