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

Unified Diff: chrome/browser/ui/views/crypto_module_password_dialog_view.h

Issue 9956157: views: Make everything in crypto module password dialog private except the ctor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: peter view Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/crypto_module_password_dialog_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/crypto_module_password_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698