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

Side by Side Diff: remoting/host/setup/win/start_host_window.h

Issue 11090063: [Chromoting] Add a simple Windows app that registers and starts a host. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_START_HOST_WINDOW_H_
6 #define REMOTING_HOST_SETUP_WIN_START_HOST_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 <atlwin.h>
alexeypa (please no reviews) 2012/10/11 16:57:52 nit: swap atlwin and atluser
simonmorris 2012/10/11 21:27:35 Done.
13 #include <atluser.h>
14 #include <string>
15
16 #include "base/basictypes.h"
17 #include "net/url_request/url_request_context_getter.h"
18 #include "remoting/host/setup/auth_code_getter_win.h"
19 #include "remoting/host/setup/host_starter.h"
20 #include "remoting/host/setup/win/host_configurer_resource.h"
21
22 namespace remoting {
23
24 class StartHostWindow : public ATL::CDialogImpl<StartHostWindow> {
alexeypa (please no reviews) 2012/10/11 16:57:52 nit: Add and explanation what this class is for.
simonmorris 2012/10/11 21:27:35 Done.
25 public:
26 enum { IDD = IDD_START_HOST };
27
28 BEGIN_MSG_MAP_EX(StartHostWindowWin)
29 MSG_WM_INITDIALOG(OnInitDialog)
30 MSG_WM_CLOSE(OnClose)
31 COMMAND_ID_HANDLER_EX(IDC_CONSENT, OnConsent)
32 COMMAND_ID_HANDLER_EX(IDOK, OnOk)
33 COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
34 END_MSG_MAP()
35
36 StartHostWindow(net::URLRequestContextGetter* url_request_context_getter);
alexeypa (please no reviews) 2012/10/11 16:57:52 nit: scoped_refptr?
simonmorris 2012/10/11 21:27:35 I don't think a scoped_refptr adds anything here.
alexeypa (please no reviews) 2012/10/12 17:09:35 scoped_refptr provides a strong guarantee.
simonmorris 2012/10/15 16:51:41 Done.
37
38 private:
39 void OnCancel(UINT code, int id, HWND control);
40 void OnClose();
41 LRESULT OnInitDialog(HWND wparam, LPARAM lparam);
42 void OnConsent(UINT code, int id, HWND control);
43 void OnOk(UINT code, int id, HWND control);
44 void OnAuthCode(const std::string& auth_code);
45 void OnHostStarted(remoting::HostStarter::Result result);
46 std::string GetDlgItemString(int id);
47
48 remoting::AuthCodeGetter auth_code_getter_;
alexeypa (please no reviews) 2012/10/11 16:57:52 nit: sort the variables alphabetically. Add commen
simonmorris 2012/10/11 21:27:35 I don't think there's any general rule that variab
49 scoped_ptr<remoting::HostStarter> host_starter_;
50 std::string host_name_;
51 std::string pin_;
52 bool consent_to_collect_data_;
53
54 DISALLOW_COPY_AND_ASSIGN(StartHostWindow);
55 };
56
57 } // namespace remoting
58
59 #endif // REMOTING_HOST_SETUP_WIN_START_HOST_WINDOW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698