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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/setup/win/start_host_window.h
diff --git a/remoting/host/setup/win/start_host_window.h b/remoting/host/setup/win/start_host_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..2927307d32c61139e9e16c987ea0d2719d39f182
--- /dev/null
+++ b/remoting/host/setup/win/start_host_window.h
@@ -0,0 +1,59 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_SETUP_WIN_START_HOST_WINDOW_H_
+#define REMOTING_HOST_SETUP_WIN_START_HOST_WINDOW_H_
+
+// altbase.h must be included before atlapp.h
+#include <atlbase.h>
+#include <atlapp.h>
+#include <atlcrack.h>
+#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.
+#include <atluser.h>
+#include <string>
+
+#include "base/basictypes.h"
+#include "net/url_request/url_request_context_getter.h"
+#include "remoting/host/setup/auth_code_getter_win.h"
+#include "remoting/host/setup/host_starter.h"
+#include "remoting/host/setup/win/host_configurer_resource.h"
+
+namespace remoting {
+
+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.
+ public:
+ enum { IDD = IDD_START_HOST };
+
+ BEGIN_MSG_MAP_EX(StartHostWindowWin)
+ MSG_WM_INITDIALOG(OnInitDialog)
+ MSG_WM_CLOSE(OnClose)
+ COMMAND_ID_HANDLER_EX(IDC_CONSENT, OnConsent)
+ COMMAND_ID_HANDLER_EX(IDOK, OnOk)
+ COMMAND_ID_HANDLER_EX(IDCANCEL, OnCancel)
+ END_MSG_MAP()
+
+ 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.
+
+ private:
+ void OnCancel(UINT code, int id, HWND control);
+ void OnClose();
+ LRESULT OnInitDialog(HWND wparam, LPARAM lparam);
+ void OnConsent(UINT code, int id, HWND control);
+ void OnOk(UINT code, int id, HWND control);
+ void OnAuthCode(const std::string& auth_code);
+ void OnHostStarted(remoting::HostStarter::Result result);
+ std::string GetDlgItemString(int id);
+
+ 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
+ scoped_ptr<remoting::HostStarter> host_starter_;
+ std::string host_name_;
+ std::string pin_;
+ bool consent_to_collect_data_;
+
+ DISALLOW_COPY_AND_ASSIGN(StartHostWindow);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_SETUP_WIN_START_HOST_WINDOW_H_

Powered by Google App Engine
This is Rietveld 408576698