| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "win8/test/open_with_dialog_controller.h" | 5 #include "win8/test/open_with_dialog_controller.h" |
| 6 | 6 |
| 7 #include <shlobj.h> | 7 #include <shlobj.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 internal::UIAutomationClient automation_client_; | 83 internal::UIAutomationClient automation_client_; |
| 84 HWND parent_window_; | 84 HWND parent_window_; |
| 85 base::string16 file_name_; | 85 base::string16 file_name_; |
| 86 base::string16 file_type_class_; | 86 base::string16 file_type_class_; |
| 87 int open_as_info_flags_; | 87 int open_as_info_flags_; |
| 88 OpenWithDialogController::SetDefaultCallback callback_; | 88 OpenWithDialogController::SetDefaultCallback callback_; |
| 89 HRESULT open_with_result_; | 89 HRESULT open_with_result_; |
| 90 HRESULT automation_result_; | 90 HRESULT automation_result_; |
| 91 std::vector<base::string16> automation_choices_; | 91 std::vector<base::string16> automation_choices_; |
| 92 base::WeakPtrFactory<Context> weak_ptr_factory_; | 92 base::WeakPtrFactory<Context> weak_ptr_factory_; |
| 93 DISALLOW_COPY_AND_ASSIGN(OpenWithDialogController::Context); | 93 DISALLOW_COPY_AND_ASSIGN(Context); |
| 94 }; | 94 }; |
| 95 | 95 |
| 96 OpenWithDialogController::Context::Context() | 96 OpenWithDialogController::Context::Context() |
| 97 : state_(CONTEXT_INITIALIZED), | 97 : state_(CONTEXT_INITIALIZED), |
| 98 parent_window_(), | 98 parent_window_(), |
| 99 open_as_info_flags_(), | 99 open_as_info_flags_(), |
| 100 open_with_result_(E_FAIL), | 100 open_with_result_(E_FAIL), |
| 101 automation_result_(E_FAIL), | 101 automation_result_(E_FAIL), |
| 102 weak_ptr_factory_(this) {} | 102 weak_ptr_factory_(this) {} |
| 103 | 103 |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 base::Bind(&OpenWithDialogController::Begin, base::Unretained(this), | 283 base::Bind(&OpenWithDialogController::Begin, base::Unretained(this), |
| 284 parent_window, protocol, program, | 284 parent_window, protocol, program, |
| 285 Bind(&OnMakeDefaultComplete, run_loop.QuitClosure(), | 285 Bind(&OnMakeDefaultComplete, run_loop.QuitClosure(), |
| 286 &result, choices))); | 286 &result, choices))); |
| 287 | 287 |
| 288 run_loop.Run(); | 288 run_loop.Run(); |
| 289 return result; | 289 return result; |
| 290 } | 290 } |
| 291 | 291 |
| 292 } // namespace win8 | 292 } // namespace win8 |
| OLD | NEW |