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/daemon_installer_win.h" | 5 #include "remoting/host/setup/daemon_installer_win.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 // Used to determine when the launched process terminates. | 107 // Used to determine when the launched process terminates. |
108 base::win::ObjectWatcher process_watcher_; | 108 base::win::ObjectWatcher process_watcher_; |
109 }; | 109 }; |
110 | 110 |
111 DaemonComInstallerWin::DaemonComInstallerWin( | 111 DaemonComInstallerWin::DaemonComInstallerWin( |
112 const ScopedComPtr<IDispatch>& update3, | 112 const ScopedComPtr<IDispatch>& update3, |
113 const CompletionCallback& done) | 113 const CompletionCallback& done) |
114 : DaemonInstallerWin(done), | 114 : DaemonInstallerWin(done), |
115 update3_(update3), | 115 update3_(update3), |
116 ALLOW_THIS_IN_INITIALIZER_LIST( | 116 polling_timer_( |
117 polling_timer_( | 117 FROM_HERE, |
118 FROM_HERE, | 118 base::TimeDelta::FromMilliseconds(kOmahaPollIntervalMs), |
119 base::TimeDelta::FromMilliseconds(kOmahaPollIntervalMs), | 119 base::Bind(&DaemonComInstallerWin::PollInstallationStatus, |
120 base::Bind(&DaemonComInstallerWin::PollInstallationStatus, | 120 base::Unretained(this)), |
121 base::Unretained(this)), | 121 false) { |
122 false)) { | |
123 } | 122 } |
124 | 123 |
125 void DaemonComInstallerWin::Install() { | 124 void DaemonComInstallerWin::Install() { |
126 // Create an app bundle. | 125 // Create an app bundle. |
127 HRESULT hr = dispatch::Invoke(update3_.get(), L"createAppBundleWeb", | 126 HRESULT hr = dispatch::Invoke(update3_.get(), L"createAppBundleWeb", |
128 DISPATCH_METHOD, bundle_.Receive()); | 127 DISPATCH_METHOD, bundle_.Receive()); |
129 if (FAILED(hr)) { | 128 if (FAILED(hr)) { |
130 Done(hr); | 129 Done(hr); |
131 return; | 130 return; |
132 } | 131 } |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 HWND parent = GetAncestor(window, GA_PARENT); | 399 HWND parent = GetAncestor(window, GA_PARENT); |
401 if (parent == NULL) { | 400 if (parent == NULL) { |
402 return window; | 401 return window; |
403 } | 402 } |
404 | 403 |
405 window = parent; | 404 window = parent; |
406 } | 405 } |
407 } | 406 } |
408 | 407 |
409 } // namespace remoting | 408 } // namespace remoting |
OLD | NEW |