Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / remoting / host / it2me / it2me_confirmation_dialog.h
blob1f8b55b334c25eded2203811f060e342955cde16
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_
6 #define REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_
8 #include "base/basictypes.h"
9 #include "base/callback_forward.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/single_thread_task_runner.h"
14 namespace remoting {
16 // Interface for a dialog to confirm an It2Me session with the user.
17 // All methods, with the exception of the constructor, are guaranteed to be
18 // called on the UI thread.
19 class It2MeConfirmationDialog {
20 public:
21 enum class Result {
22 OK,
23 CANCEL
26 typedef base::Callback<void(Result)> ResultCallback;
28 virtual ~It2MeConfirmationDialog() {}
30 // Shows the dialog. |callback| will be called with the user's selection.
31 // |callback| will not be called if the dialog is destroyed.
32 virtual void Show(const ResultCallback& callback) = 0;
35 // Used to create an platform specific instance of It2MeConfirmationDialog.
36 class It2MeConfirmationDialogFactory {
37 public:
38 It2MeConfirmationDialogFactory();
39 virtual ~It2MeConfirmationDialogFactory();
41 virtual scoped_ptr<It2MeConfirmationDialog> Create();
43 DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogFactory);
46 } // namespace remoting
48 #endif // REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_