| 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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // |ui_task_runner| must be the UI thread. It will be used to call into the | 21 // |ui_task_runner| must be the UI thread. It will be used to call into the |
| 22 // wrapped dialog. | 22 // wrapped dialog. |
| 23 // |dialog| is the dialog being wrapped. | 23 // |dialog| is the dialog being wrapped. |
| 24 It2MeConfirmationDialogProxy( | 24 It2MeConfirmationDialogProxy( |
| 25 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, | 25 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, |
| 26 std::unique_ptr<It2MeConfirmationDialog> dialog); | 26 std::unique_ptr<It2MeConfirmationDialog> dialog); |
| 27 | 27 |
| 28 ~It2MeConfirmationDialogProxy() override; | 28 ~It2MeConfirmationDialogProxy() override; |
| 29 | 29 |
| 30 // It2MeConfirmationDialog implementation. | 30 // It2MeConfirmationDialog implementation. |
| 31 void Show(const It2MeConfirmationDialog::ResultCallback& callback) override; | 31 void Show(const std::string& remote_user_email, |
| 32 const It2MeConfirmationDialog::ResultCallback& callback) override; |
| 32 | 33 |
| 33 private: | 34 private: |
| 34 class Core; | 35 class Core; |
| 35 | 36 |
| 36 void ReportResult(It2MeConfirmationDialog::Result result); | 37 void ReportResult(It2MeConfirmationDialog::Result result); |
| 37 | 38 |
| 38 std::unique_ptr<Core> core_; | 39 std::unique_ptr<Core> core_; |
| 39 It2MeConfirmationDialog::ResultCallback callback_; | 40 It2MeConfirmationDialog::ResultCallback callback_; |
| 40 base::WeakPtrFactory<It2MeConfirmationDialogProxy> weak_factory_; | 41 base::WeakPtrFactory<It2MeConfirmationDialogProxy> weak_factory_; |
| 41 | 42 |
| 42 DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogProxy); | 43 DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogProxy); |
| 43 }; | 44 }; |
| 44 | 45 |
| 45 } // namespace remoting | 46 } // namespace remoting |
| 46 | 47 |
| 47 #endif // REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_PROXY_H_ | 48 #endif // REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_PROXY_H_ |
| OLD | NEW |