OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 //////////////////////////////////////////////////////////////////////////////// | 23 //////////////////////////////////////////////////////////////////////////////// |
24 CryptoModulePasswordDialogView::CryptoModulePasswordDialogView( | 24 CryptoModulePasswordDialogView::CryptoModulePasswordDialogView( |
25 const std::string& slot_name, | 25 const std::string& slot_name, |
26 browser::CryptoModulePasswordReason reason, | 26 browser::CryptoModulePasswordReason reason, |
27 const std::string& server, | 27 const std::string& server, |
28 const base::Callback<void(const char*)>& callback) | 28 const base::Callback<void(const char*)>& callback) |
29 : callback_(callback) { | 29 : callback_(callback) { |
30 Init(server, slot_name, reason); | 30 Init(server, slot_name, reason); |
31 } | 31 } |
32 | 32 |
| 33 CryptoModulePasswordDialogView::~CryptoModulePasswordDialogView() { |
| 34 } |
| 35 |
33 void CryptoModulePasswordDialogView::Init( | 36 void CryptoModulePasswordDialogView::Init( |
34 const std::string& server, | 37 const std::string& server, |
35 const std::string& slot_name, | 38 const std::string& slot_name, |
36 browser::CryptoModulePasswordReason reason) { | 39 browser::CryptoModulePasswordReason reason) { |
37 // Select an appropriate text for the reason. | 40 // Select an appropriate text for the reason. |
38 std::string text; | 41 std::string text; |
39 const string16& server16 = UTF8ToUTF16(server); | 42 const string16& server16 = UTF8ToUTF16(server); |
40 const string16& slot16 = UTF8ToUTF16(slot_name); | 43 const string16& slot16 = UTF8ToUTF16(slot_name); |
41 switch (reason) { | 44 switch (reason) { |
42 case browser::kCryptoModulePasswordKeygen: | 45 case browser::kCryptoModulePasswordKeygen: |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 password_entry_->SetText(empty); | 138 password_entry_->SetText(empty); |
136 return true; | 139 return true; |
137 } | 140 } |
138 | 141 |
139 bool CryptoModulePasswordDialogView::HandleKeyEvent( | 142 bool CryptoModulePasswordDialogView::HandleKeyEvent( |
140 views::Textfield* sender, | 143 views::Textfield* sender, |
141 const views::KeyEvent& keystroke) { | 144 const views::KeyEvent& keystroke) { |
142 return false; | 145 return false; |
143 } | 146 } |
144 | 147 |
| 148 void CryptoModulePasswordDialogView::ContentsChanged( |
| 149 views::Textfield* sender, |
| 150 const string16& new_contents) { |
| 151 } |
| 152 |
145 string16 CryptoModulePasswordDialogView::GetWindowTitle() const { | 153 string16 CryptoModulePasswordDialogView::GetWindowTitle() const { |
146 return UTF8ToUTF16(l10n_util::GetStringUTF8( | 154 return UTF8ToUTF16(l10n_util::GetStringUTF8( |
147 IDS_CRYPTO_MODULE_AUTH_DIALOG_TITLE)); | 155 IDS_CRYPTO_MODULE_AUTH_DIALOG_TITLE)); |
148 } | 156 } |
149 } // namespace browser | 157 } // namespace browser |
OLD | NEW |