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/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/ui/views/window.h" | 10 #include "chrome/browser/ui/views/window.h" |
11 #include "googleurl/src/gurl.h" | 11 #include "googleurl/src/gurl.h" |
12 #include "grit/generated_resources.h" | 12 #include "grit/generated_resources.h" |
13 #include "ui/base/l10n/l10n_util.h" | 13 #include "ui/base/l10n/l10n_util.h" |
14 #include "ui/views/controls/button/text_button.h" | 14 #include "ui/views/controls/button/text_button.h" |
15 #include "ui/views/controls/label.h" | 15 #include "ui/views/controls/label.h" |
16 #include "ui/views/controls/textfield/textfield.h" | 16 #include "ui/views/controls/textfield/textfield.h" |
17 #include "ui/views/layout/grid_layout.h" | 17 #include "ui/views/layout/grid_layout.h" |
18 #include "ui/views/layout/layout_constants.h" | 18 #include "ui/views/layout/layout_constants.h" |
19 #include "ui/views/widget/widget.h" | 19 #include "ui/views/widget/widget.h" |
20 | 20 |
21 int kInputPasswordMinWidth = 8; | |
22 | |
23 namespace browser { | 21 namespace browser { |
24 | 22 |
25 // CryptoModulePasswordDialogView | 23 // CryptoModulePasswordDialogView |
26 //////////////////////////////////////////////////////////////////////////////// | 24 //////////////////////////////////////////////////////////////////////////////// |
27 CryptoModulePasswordDialogView::CryptoModulePasswordDialogView( | 25 CryptoModulePasswordDialogView::CryptoModulePasswordDialogView( |
28 const std::string& slot_name, | 26 const std::string& slot_name, |
29 browser::CryptoModulePasswordReason reason, | 27 browser::CryptoModulePasswordReason reason, |
30 const std::string& server, | 28 const std::string& server, |
31 const base::Callback<void(const char*)>& callback) | 29 const base::Callback<void(const char*)>& callback) |
32 : callback_(callback) { | 30 : callback_(callback) { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 bool retry, | 155 bool retry, |
158 CryptoModulePasswordReason reason, | 156 CryptoModulePasswordReason reason, |
159 const std::string& server, | 157 const std::string& server, |
160 const CryptoModulePasswordCallback& callback) { | 158 const CryptoModulePasswordCallback& callback) { |
161 CryptoModulePasswordDialogView* dialog = | 159 CryptoModulePasswordDialogView* dialog = |
162 new CryptoModulePasswordDialogView(slot_name, reason, server, callback); | 160 new CryptoModulePasswordDialogView(slot_name, reason, server, callback); |
163 views::Widget::CreateWindow(dialog)->Show(); | 161 views::Widget::CreateWindow(dialog)->Show(); |
164 } | 162 } |
165 | 163 |
166 } // namespace browser | 164 } // namespace browser |
OLD | NEW |