| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <atlbase.h> | 5 #include <atlbase.h> |
| 6 #include <atlapp.h> // NOLINT | 6 #include <atlapp.h> // NOLINT |
| 7 | 7 |
| 8 #include "base/at_exit.h" | 8 #include "base/at_exit.h" |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 return 0; | 273 return 0; |
| 274 } | 274 } |
| 275 | 275 |
| 276 LRESULT SetupDialog::OnCancel(UINT, INT nIdentifier, HWND, BOOL& handled) { | 276 LRESULT SetupDialog::OnCancel(UINT, INT nIdentifier, HWND, BOOL& handled) { |
| 277 DestroyWindow(); | 277 DestroyWindow(); |
| 278 return 0; | 278 return 0; |
| 279 } | 279 } |
| 280 | 280 |
| 281 LRESULT SetupDialog::OnDestroy(UINT message, WPARAM wparam, LPARAM lparam, | 281 LRESULT SetupDialog::OnDestroy(UINT message, WPARAM wparam, LPARAM lparam, |
| 282 BOOL& handled) { | 282 BOOL& handled) { |
| 283 base::MessageLoop::current()->PostTask(FROM_HERE, | 283 base::MessageLoop::current()->PostTask( |
| 284 base::MessageLoop::QuitClosure()); | 284 FROM_HERE, base::MessageLoop::QuitWhenIdleClosure()); |
| 285 return 1; | 285 return 1; |
| 286 } | 286 } |
| 287 | 287 |
| 288 void SetupDialog::DisableControls() { | 288 void SetupDialog::DisableControls() { |
| 289 GetDlgItem(IDC_START).EnableWindow(FALSE); | 289 GetDlgItem(IDC_START).EnableWindow(FALSE); |
| 290 GetDlgItem(IDC_INSTALL).EnableWindow(FALSE); | 290 GetDlgItem(IDC_INSTALL).EnableWindow(FALSE); |
| 291 GetDlgItem(IDC_USER).EnableWindow(FALSE); | 291 GetDlgItem(IDC_USER).EnableWindow(FALSE); |
| 292 GetDlgItem(IDC_PASSWORD).EnableWindow(FALSE); | 292 GetDlgItem(IDC_PASSWORD).EnableWindow(FALSE); |
| 293 GetDlgItem(IDC_LOGGING).EnableWindow(FALSE); | 293 GetDlgItem(IDC_LOGGING).EnableWindow(FALSE); |
| 294 } | 294 } |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 | 453 |
| 454 base::MessageLoopForUI loop; | 454 base::MessageLoopForUI loop; |
| 455 scoped_refptr<SetupDialog> dialog(new SetupDialog()); | 455 scoped_refptr<SetupDialog> dialog(new SetupDialog()); |
| 456 dialog->Create(NULL); | 456 dialog->Create(NULL); |
| 457 dialog->ShowWindow(SW_SHOW); | 457 dialog->ShowWindow(SW_SHOW); |
| 458 SetupDialog::Dispatcher dispatcher(dialog.get()); | 458 SetupDialog::Dispatcher dispatcher(dialog.get()); |
| 459 base::RunLoop run_loop(&dispatcher); | 459 base::RunLoop run_loop(&dispatcher); |
| 460 run_loop.Run(); | 460 run_loop.Run(); |
| 461 return 0; | 461 return 0; |
| 462 } | 462 } |
| OLD | NEW |