Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_HOST_VERIFY_CONFIG_WINDOW_WIN_H | |
| 6 #define REMOTING_HOST_VERIFY_CONFIG_WINDOW_WIN_H | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 | |
| 12 namespace remoting { | |
| 13 | |
| 14 // TODO(simonmorris): Derive this class from ATL's CDialog. | |
| 15 class VerifyConfigWindowWin { | |
| 16 public: | |
| 17 VerifyConfigWindowWin(const std::string& email, | |
| 18 const std::string& host_id, | |
| 19 const std::string& host_secret_hash); | |
| 20 ~VerifyConfigWindowWin(); | |
| 21 | |
| 22 // Run the dialog modally. Returns non-zero for successful verification. | |
| 23 int Run(); | |
|
Jamie
2012/04/13 16:40:03
Nit: Why not bool?
simonmorris
2012/04/13 16:48:03
DialogBoxParam returns an int, so it's more flexib
| |
| 24 | |
| 25 private: | |
| 26 static BOOL CALLBACK DialogProc(HWND hwmd, UINT msg, WPARAM wParam, | |
| 27 LPARAM lParam); | |
| 28 | |
| 29 BOOL OnDialogMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam); | |
| 30 | |
| 31 void InitDialog(); | |
| 32 void EndDialog(); | |
| 33 bool VerifyHostSecretHash(); | |
| 34 | |
| 35 HWND hwnd_; | |
| 36 const std::string email_; | |
| 37 const std::string host_id_; | |
| 38 const std::string host_secret_hash_; | |
| 39 | |
| 40 DISALLOW_COPY_AND_ASSIGN(VerifyConfigWindowWin); | |
| 41 }; | |
| 42 | |
| 43 } | |
| 44 | |
| 45 #endif // REMOTING_HOST_VERIFY_CONFIG_WINDOW_WIN_H | |
| OLD | NEW |