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_SETUP_WIN_HOST_CONFIGURER_WINDOW_H_ | |
| 6 #define REMOTING_HOST_SETUP_WIN_HOST_CONFIGURER_WINDOW_H_ | |
| 7 | |
| 8 // altbase.h must be included before atlapp.h | |
| 9 #include <atlbase.h> | |
| 10 #include <atlapp.h> | |
| 11 #include <atlcrack.h> | |
| 12 #include <atluser.h> | |
| 13 #include <atlwin.h> | |
| 14 #include <string> | |
| 15 | |
| 16 #include "base/basictypes.h" | |
| 17 #include "base/callback.h" | |
| 18 #include "net/url_request/url_request_context_getter.h" | |
| 19 #include "remoting/host/setup/win/host_configurer_resource.h" | |
| 20 | |
| 21 namespace remoting { | |
| 22 | |
| 23 class HostConfigurerWindow : public ATL::CDialogImpl<HostConfigurerWindow> { | |
|
alexeypa (please no reviews)
2012/10/15 18:48:55
nit: Add a comment explaining that this class is a
simonmorris
2012/10/15 21:20:14
Done.
| |
| 24 public: | |
| 25 enum { IDD = IDD_MAIN }; | |
| 26 | |
| 27 BEGIN_MSG_MAP_EX(HostConfigurerWindow) | |
| 28 MSG_WM_INITDIALOG(OnInitDialog) | |
| 29 MSG_WM_CLOSE(OnClose) | |
| 30 COMMAND_ID_HANDLER_EX(IDC_START_HOST, OnStartHost) | |
| 31 END_MSG_MAP() | |
| 32 | |
| 33 HostConfigurerWindow( | |
|
alexeypa (please no reviews)
2012/10/15 18:48:55
nit: I suspect all methods of this class should be
simonmorris
2012/10/15 21:20:14
Done.
| |
| 34 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, | |
| 35 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | |
| 36 base::Closure quit); | |
| 37 | |
| 38 private: | |
| 39 void OnCancel(UINT code, int id, HWND control); | |
| 40 void OnClose(); | |
| 41 LRESULT OnInitDialog(HWND wparam, LPARAM lparam); | |
| 42 void OnOk(UINT code, int id, HWND control); | |
| 43 void OnStartHost(UINT code, int id, HWND control); | |
| 44 | |
| 45 // Destroys the window and quits the UI message loop. | |
| 46 void Finish(); | |
| 47 | |
| 48 // Sets an appropriate initial position for the dialog. | |
| 49 void PositionWindow(); | |
| 50 | |
| 51 // Context needed to start the host. | |
| 52 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_; | |
| 53 | |
| 54 // The UI task runner. | |
| 55 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_; | |
| 56 | |
| 57 // A task that quits the UI message loop. | |
| 58 base::Closure quit_; | |
|
alexeypa (please no reviews)
2012/10/15 18:48:55
nit: You don't have to mention that |quit_| stop t
simonmorris
2012/10/15 21:20:14
Done.
| |
| 59 | |
| 60 DISALLOW_COPY_AND_ASSIGN(HostConfigurerWindow); | |
| 61 }; | |
| 62 | |
| 63 } // namespace remoting | |
| 64 | |
| 65 #endif // REMOTING_HOST_SETUP_WIN_HOST_CONFIGURER_WINDOW_H_ | |
| OLD | NEW |