Index: chrome/browser/ui/views/crypto_module_password_dialog_view.h |
diff --git a/chrome/browser/ui/views/crypto_module_password_dialog_view.h b/chrome/browser/ui/views/crypto_module_password_dialog_view.h |
index 049e0bc317012cca1fc5970f7a32507791d91e1b..3ca287b7370695099f58bba1d406800fd4d8f1c6 100644 |
--- a/chrome/browser/ui/views/crypto_module_password_dialog_view.h |
+++ b/chrome/browser/ui/views/crypto_module_password_dialog_view.h |
@@ -7,57 +7,51 @@ |
#pragma once |
#include <string> |
-#include <vector> |
-#include "base/callback.h" |
+#include "base/basictypes.h" |
#include "base/gtest_prod_util.h" |
#include "chrome/browser/ui/crypto_module_password_dialog.h" |
#include "ui/views/controls/textfield/textfield_controller.h" |
#include "ui/views/window/dialog_delegate.h" |
namespace views { |
-class Textfield; |
class Label; |
+class Textfield; |
} |
namespace browser { |
-// CryptoModulePasswordDialogView |
-// Dialog view for crypto module password interaction. |
-///////////////////////////////////////////////////////////////////////// |
class CryptoModulePasswordDialogView : public views::DialogDelegateView, |
public views::TextfieldController { |
public: |
- CryptoModulePasswordDialogView( |
- const std::string& slot_name, |
- browser::CryptoModulePasswordReason reason, |
- const std::string& server, |
- const base::Callback<void(const char*)>& callback); |
+ CryptoModulePasswordDialogView(const std::string& slot_name, |
+ CryptoModulePasswordReason reason, |
+ const std::string& server, |
+ const CryptoModulePasswordCallback& callback); |
virtual ~CryptoModulePasswordDialogView(); |
- // views::DialogDelegate: |
- virtual bool Accept() OVERRIDE; |
- virtual bool Cancel() OVERRIDE; |
- virtual string16 GetDialogButtonLabel( |
- ui::DialogButton button) const OVERRIDE; |
- |
+ private: |
+ FRIEND_TEST_ALL_PREFIXES(CryptoModulePasswordDialogViewTest, TestAccept); |
// views::WidgetDelegate: |
virtual views::View* GetInitiallyFocusedView() OVERRIDE; |
virtual ui::ModalType GetModalType() const OVERRIDE; |
+ virtual string16 GetWindowTitle() const OVERRIDE; |
virtual views::View* GetContentsView() OVERRIDE; |
- // views::View: |
- virtual string16 GetWindowTitle() const OVERRIDE; |
+ // views::DialogDelegate: |
+ virtual string16 GetDialogButtonLabel( |
+ ui::DialogButton button) const OVERRIDE; |
+ virtual bool Cancel() OVERRIDE; |
+ virtual bool Accept() OVERRIDE; |
// views::TextfieldController: |
- virtual bool HandleKeyEvent(views::Textfield* sender, |
- const views::KeyEvent& keystroke) OVERRIDE; |
virtual void ContentsChanged(views::Textfield* sender, |
const string16& new_contents) OVERRIDE; |
+ virtual bool HandleKeyEvent(views::Textfield* sender, |
+ const views::KeyEvent& keystroke) OVERRIDE; |
- private: |
// Initialize views and layout. |
void Init(const std::string& server, |
const std::string& slot_name, |
@@ -68,8 +62,7 @@ class CryptoModulePasswordDialogView : public views::DialogDelegateView, |
views::Label* password_label_; |
views::Textfield* password_entry_; |
- const base::Callback<void(const char*)> callback_; |
- FRIEND_TEST_ALL_PREFIXES(CryptoModulePasswordDialogViewTest, TestAccept); |
+ const CryptoModulePasswordCallback callback_; |
DISALLOW_COPY_AND_ASSIGN(CryptoModulePasswordDialogView); |
}; |