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

Unified Diff: remoting/host/verify_config_window_win.h

Issue 10266024: Make the PIN confirmation dialog an ATL-based one and brushing it up a little bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased 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 | « remoting/host/elevated_controller_win.cc ('k') | remoting/host/verify_config_window_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/verify_config_window_win.h
diff --git a/remoting/host/verify_config_window_win.h b/remoting/host/verify_config_window_win.h
index fc84427b289f65497e23f9ab56e29dfd8a743e4f..b9709eda77cae885931e4347e723bc8216ac0718 100644
--- a/remoting/host/verify_config_window_win.h
+++ b/remoting/host/verify_config_window_win.h
@@ -5,34 +5,41 @@
#ifndef REMOTING_HOST_VERIFY_CONFIG_WINDOW_WIN_H
#define REMOTING_HOST_VERIFY_CONFIG_WINDOW_WIN_H
+#include <atlbase.h>
+#include <atlcrack.h>
+#include <atlwin.h>
#include <string>
#include "base/callback.h"
+#include "remoting/host/elevated_controller_resource.h"
namespace remoting {
-// TODO(simonmorris): Derive this class from ATL's CDialog.
-class VerifyConfigWindowWin {
+class VerifyConfigWindowWin : public ATL::CDialogImpl<VerifyConfigWindowWin> {
public:
- VerifyConfigWindowWin(const std::string& email,
- const std::string& host_id,
- const std::string& host_secret_hash);
- ~VerifyConfigWindowWin();
+ enum { IDD = IDD_VERIFY_CONFIG_DIALOG };
- // Run the dialog modally. Returns true on successful verification.
- bool Run();
+ BEGIN_MSG_MAP_EX(VerifyConfigWindowWin)
+ MSG_WM_INITDIALOG(OnInitDialog)
+ MSG_WM_CLOSE(OnClose)
+ COMMAND_ID_HANDLER_EX(IDOK, OnOk)
+ COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
+ END_MSG_MAP()
- private:
- static BOOL CALLBACK DialogProc(HWND hwmd, UINT msg, WPARAM wParam,
- LPARAM lParam);
+ VerifyConfigWindowWin(const std::string& email,
+ const std::string& host_id,
+ const std::string& host_secret_hash);
- BOOL OnDialogMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
+ void OnCancel(UINT code, int id, HWND control);
+ void OnClose();
+ LRESULT OnInitDialog(HWND wparam, LPARAM lparam);
+ void OnOk(UINT code, int id, HWND control);
- void InitDialog();
- void EndDialog();
+ private:
+ // Centers the dialog window against the owner window.
+ void CenterWindow();
bool VerifyHostSecretHash();
- HWND hwnd_;
const std::string email_;
const std::string host_id_;
const std::string host_secret_hash_;
« no previous file with comments | « remoting/host/elevated_controller_win.cc ('k') | remoting/host/verify_config_window_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698