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

Unified 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: 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/host_configurer_window.h
diff --git a/remoting/host/setup/win/host_configurer_window.h b/remoting/host/setup/win/host_configurer_window.h
new file mode 100644
index 0000000000000000000000000000000000000000..ed3ada65f33876cfafc1cd864164bd7d8e17c803
--- /dev/null
+++ b/remoting/host/setup/win/host_configurer_window.h
@@ -0,0 +1,51 @@
+// 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_HOST_CONFIGURER_WINDOW_H_
+#define REMOTING_HOST_SETUP_WIN_HOST_CONFIGURER_WINDOW_H_
+
+// altbase.h must be included before atlapp.h
+#include <atlbase.h>
+#include <atlapp.h>
+#include <atlcrack.h>
+#include <atlwin.h>
+#include <atluser.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 <string>
+
+#include "base/basictypes.h"
+#include "net/url_request/url_request_context_getter.h"
+#include "remoting/host/setup/win/host_configurer_resource.h"
+
+namespace remoting {
+
+class HostConfigurerWindow : public ATL::CDialogImpl<HostConfigurerWindow> {
+ public:
+ enum { IDD = IDD_MAIN };
+
+ BEGIN_MSG_MAP_EX(HostConfigurerWindow)
+ MSG_WM_INITDIALOG(OnInitDialog)
+ MSG_WM_CLOSE(OnClose)
+ COMMAND_ID_HANDLER_EX(IDC_START_HOST, OnStartHost)
+ END_MSG_MAP()
+
+ HostConfigurerWindow(
+ net::URLRequestContextGetter* url_request_context_getter);
+
+ private:
+ void OnCancel(UINT code, int id, HWND control);
+ void OnClose();
+ LRESULT OnInitDialog(HWND wparam, LPARAM lparam);
+ void OnOk(UINT code, int id, HWND control);
+ void OnStartHost(UINT code, int id, HWND control);
+ // Sets an appropriate initial position for the dialog.
alexeypa (please no reviews) 2012/10/11 16:57:52 nit: Separate the message handlers from the follow
simonmorris 2012/10/11 21:27:35 Done.
+ void PositionWindow();
+
+ net::URLRequestContextGetter* url_request_context_getter_;
alexeypa (please no reviews) 2012/10/11 16:57:52 scoped_reptf? Please add a quick comment what this
simonmorris 2012/10/11 21:27:35 I don't think scoped_refptr adds anything here. Th
alexeypa (please no reviews) 2012/10/12 17:09:35 It is not apparent from the code. scoped_refptr pr
simonmorris 2012/10/15 16:51:41 One result of that guarantee is that it becomes im
alexeypa (please no reviews) 2012/10/15 18:48:55 It is not possible to know without scoped_refptr a
Sergey Ulanov 2012/10/15 23:44:26 +1 on this. Using raw pointer for ref-counted obje
+
+ DISALLOW_COPY_AND_ASSIGN(HostConfigurerWindow);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_SETUP_WIN_HOST_CONFIGURER_WINDOW_H_

Powered by Google App Engine
This is Rietveld 408576698