OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/host/setup/win/start_host_window.h" | 5 #include "remoting/host/setup/win/start_host_window.h" |
6 | 6 |
7 #include <atlbase.h> | 7 #include <atlbase.h> |
8 #include <atlwin.h> | 8 #include <atlwin.h> |
9 #include <windows.h> | 9 #include <windows.h> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "base/strings/utf_string_conversions.h" | 13 #include "base/strings/utf_string_conversions.h" |
14 #include "google_apis/gaia/gaia_urls.h" | 14 #include "google_apis/gaia/gaia_urls.h" |
15 #include "remoting/host/service_urls.h" | 15 #include "remoting/host/service_urls.h" |
16 #include "remoting/host/setup/oauth_helper.h" | 16 #include "remoting/host/setup/oauth_helper.h" |
17 #include "remoting/host/setup/pin_validator.h" | 17 #include "remoting/host/setup/pin_validator.h" |
18 #include "remoting/host/setup/win/load_string_from_resource.h" | 18 #include "remoting/host/setup/win/load_string_from_resource.h" |
19 | 19 |
20 namespace remoting { | 20 namespace remoting { |
21 | 21 |
22 StartHostWindow::StartHostWindow( | 22 StartHostWindow::StartHostWindow( |
23 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) | 23 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter) |
24 : host_starter_(remoting::HostStarter::Create( | 24 : host_starter_(remoting::HostStarter::Create( |
25 GaiaUrls::GetInstance()->oauth2_token_url(), | |
26 remoting::ServiceUrls::GetInstance()->directory_hosts_url(), | 25 remoting::ServiceUrls::GetInstance()->directory_hosts_url(), |
27 url_request_context_getter)), | 26 url_request_context_getter)), |
28 consent_to_collect_data_(true), | 27 consent_to_collect_data_(true), |
29 mem_mgr_(GetProcessHeap()), | 28 mem_mgr_(GetProcessHeap()), |
30 string_mgr_(&mem_mgr_), | 29 string_mgr_(&mem_mgr_), |
31 weak_ptr_factory_(this), | 30 weak_ptr_factory_(this), |
32 weak_ptr_(weak_ptr_factory_.GetWeakPtr()) { | 31 weak_ptr_(weak_ptr_factory_.GetWeakPtr()) { |
33 } | 32 } |
34 | 33 |
35 void StartHostWindow::OnCancel(UINT code, int id, HWND control) { | 34 void StartHostWindow::OnCancel(UINT code, int id, HWND control) { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 96 } |
98 } | 97 } |
99 | 98 |
100 std::string StartHostWindow::GetDlgItemString(int id) { | 99 std::string StartHostWindow::GetDlgItemString(int id) { |
101 CSimpleString str(L"", &string_mgr_); | 100 CSimpleString str(L"", &string_mgr_); |
102 GetDlgItemText(id, str); | 101 GetDlgItemText(id, str); |
103 return UTF16ToUTF8(str.GetString()); | 102 return UTF16ToUTF8(str.GetString()); |
104 } | 103 } |
105 | 104 |
106 } // namespace remoting | 105 } // namespace remoting |
OLD | NEW |