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

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: Fix non-standard resource header file. 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 // This dialog is modeless, so that it can be created before its message loop
24 // starts to run.
25 class HostConfigurerWindow : public ATL::CDialogImpl<HostConfigurerWindow> {
26 public:
27 enum { IDD = IDD_MAIN };
28
29 BEGIN_MSG_MAP_EX(HostConfigurerWindow)
30 MSG_WM_INITDIALOG(OnInitDialog)
31 MSG_WM_CLOSE(OnClose)
32 COMMAND_ID_HANDLER_EX(IDC_START_HOST, OnStartHost)
33 END_MSG_MAP()
34
35 HostConfigurerWindow(
36 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter,
37 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
38 base::Closure on_destroy);
39
40 private:
41 // All methods in this class must be called on the UI thread.
42 void OnCancel(UINT code, int id, HWND control);
43 void OnClose();
44 LRESULT OnInitDialog(HWND wparam, LPARAM lparam);
45 void OnOk(UINT code, int id, HWND control);
46 void OnStartHost(UINT code, int id, HWND control);
47
48 // Destroys the window and quits the UI message loop.
49 void Finish();
50
51 // Sets an appropriate initial position for the dialog.
52 void PositionWindow();
53
54 // Context needed to start the host.
55 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter_;
56
57 // The UI task runner.
58 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
59
60 // A task used to notify the caller that this window has been destroyed.
61 base::Closure on_destroy_;
62
63 DISALLOW_COPY_AND_ASSIGN(HostConfigurerWindow);
64 };
65
66 } // namespace remoting
67
68 #endif // REMOTING_HOST_SETUP_WIN_HOST_CONFIGURER_WINDOW_H_
OLDNEW
« no previous file with comments | « remoting/host/setup/win/host_configurer_resource.h ('k') | remoting/host/setup/win/host_configurer_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698