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

Side by Side Diff: remoting/host/setup/win/host_configurer_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: Review. 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_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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698