| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/it2me/it2me_confirmation_dialog_proxy.h" | 5 #include "remoting/host/it2me/it2me_confirmation_dialog_proxy.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| 11 #include "base/location.h" | 11 #include "base/location.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/thread_task_runner_handle.h" | 13 #include "base/threading/thread_task_runner_handle.h" |
| 14 | 14 |
| 15 namespace remoting { | 15 namespace remoting { |
| 16 | 16 |
| 17 class It2MeConfirmationDialogProxy::Core { | 17 class It2MeConfirmationDialogProxy::Core { |
| 18 public: | 18 public: |
| 19 Core(scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 19 Core(scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| 20 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, | 20 scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner, |
| 21 base::WeakPtr<It2MeConfirmationDialogProxy> parent, | 21 base::WeakPtr<It2MeConfirmationDialogProxy> parent, |
| 22 std::unique_ptr<It2MeConfirmationDialog> dialog); | 22 std::unique_ptr<It2MeConfirmationDialog> dialog); |
| 23 ~Core(); | 23 ~Core(); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 base::Unretained(core_.get()))); | 99 base::Unretained(core_.get()))); |
| 100 } | 100 } |
| 101 | 101 |
| 102 void It2MeConfirmationDialogProxy::ReportResult( | 102 void It2MeConfirmationDialogProxy::ReportResult( |
| 103 It2MeConfirmationDialog::Result result) { | 103 It2MeConfirmationDialog::Result result) { |
| 104 DCHECK(core_->caller_task_runner()->BelongsToCurrentThread()); | 104 DCHECK(core_->caller_task_runner()->BelongsToCurrentThread()); |
| 105 base::ResetAndReturn(&callback_).Run(result); | 105 base::ResetAndReturn(&callback_).Run(result); |
| 106 } | 106 } |
| 107 | 107 |
| 108 } // namespace remoting | 108 } // namespace remoting |
| OLD | NEW |