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 #ifndef REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_PROXY_H_ | 5 #ifndef REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_PROXY_H_ |
6 #define REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_PROXY_H_ | 6 #define REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_PROXY_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 #include "base/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "base/single_thread_task_runner.h" | 12 #include "base/single_thread_task_runner.h" |
13 #include "base/threading/non_thread_safe.h" | |
14 #include "remoting/host/it2me/it2me_confirmation_dialog.h" | 13 #include "remoting/host/it2me/it2me_confirmation_dialog.h" |
15 | 14 |
16 namespace remoting { | 15 namespace remoting { |
17 | 16 |
18 // A helper class to use an It2MeConfirmationDialog from a non-UI thread. | 17 // A helper class to use an It2MeConfirmationDialog from a non-UI thread. |
19 class It2MeConfirmationDialogProxy : public It2MeConfirmationDialog { | 18 class It2MeConfirmationDialogProxy : public It2MeConfirmationDialog { |
20 public: | 19 public: |
21 // |ui_task_runner| must be the UI thread. It will be used to call into the | 20 // |ui_task_runner| must be the UI thread. It will be used to call into the |
22 // wrapped dialog. | 21 // wrapped dialog. |
23 // |dialog| is the dialog being wrapped. | 22 // |dialog| is the dialog being wrapped. |
(...skipping 15 matching lines...) Expand all Loading... |
39 std::unique_ptr<Core> core_; | 38 std::unique_ptr<Core> core_; |
40 It2MeConfirmationDialog::ResultCallback callback_; | 39 It2MeConfirmationDialog::ResultCallback callback_; |
41 base::WeakPtrFactory<It2MeConfirmationDialogProxy> weak_factory_; | 40 base::WeakPtrFactory<It2MeConfirmationDialogProxy> weak_factory_; |
42 | 41 |
43 DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogProxy); | 42 DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogProxy); |
44 }; | 43 }; |
45 | 44 |
46 } // namespace remoting | 45 } // namespace remoting |
47 | 46 |
48 #endif // REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_PROXY_H_ | 47 #endif // REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_PROXY_H_ |
OLD | NEW |