Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: remoting/host/it2me/it2me_confirmation_dialog.h

Issue 816903002: It2Me Confirmation Dialog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows bot failure. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_confirmation_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/it2me/it2me_confirmation_dialog.h
diff --git a/remoting/host/it2me/it2me_confirmation_dialog.h b/remoting/host/it2me/it2me_confirmation_dialog.h
new file mode 100644
index 0000000000000000000000000000000000000000..1f8b55b334c25eded2203811f060e342955cde16
--- /dev/null
+++ b/remoting/host/it2me/it2me_confirmation_dialog.h
@@ -0,0 +1,48 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_
+#define REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_
+
+#include "base/basictypes.h"
+#include "base/callback_forward.h"
+#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
+#include "base/single_thread_task_runner.h"
+
+namespace remoting {
+
+// Interface for a dialog to confirm an It2Me session with the user.
+// All methods, with the exception of the constructor, are guaranteed to be
+// called on the UI thread.
+class It2MeConfirmationDialog {
+ public:
+ enum class Result {
+ OK,
+ CANCEL
+ };
+
+ typedef base::Callback<void(Result)> ResultCallback;
+
+ virtual ~It2MeConfirmationDialog() {}
+
+ // Shows the dialog. |callback| will be called with the user's selection.
+ // |callback| will not be called if the dialog is destroyed.
+ virtual void Show(const ResultCallback& callback) = 0;
+};
+
+// Used to create an platform specific instance of It2MeConfirmationDialog.
+class It2MeConfirmationDialogFactory {
+ public:
+ It2MeConfirmationDialogFactory();
+ virtual ~It2MeConfirmationDialogFactory();
+
+ virtual scoped_ptr<It2MeConfirmationDialog> Create();
+
+ DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogFactory);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_confirmation_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698