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

Unified Diff: remoting/host/chromeos/message_box.h

Issue 690183002: Remote assistance on Chrome OS Part V - It2MeHost Continue Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix views dependencies Created 6 years, 1 month 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/chromeos/message_box.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/chromeos/message_box.h
diff --git a/remoting/host/chromeos/message_box.h b/remoting/host/chromeos/message_box.h
new file mode 100644
index 0000000000000000000000000000000000000000..2ff6c526970adf1474554537e0fdca9e6f6c2cd0
--- /dev/null
+++ b/remoting/host/chromeos/message_box.h
@@ -0,0 +1,49 @@
+// 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_CHROMEOS_MESSAGE_BOX_H_
+#define REMOTING_HOST_CHROMEOS_MESSAGE_BOX_H_
+
+#include "base/callback_helpers.h"
+#include "base/strings/string16.h"
+#include "base/threading/thread_checker.h"
+
+namespace remoting {
+
+// Overview:
+// Shows a system modal message box with OK and cancel buttons. This class
+// is not thread-safe, it must be called on the UI thread of the browser
+// process.
+class MessageBox {
+ public:
+ enum Result {
+ OK,
+ CANCEL
+ };
+
+ // ResultCallback will be invoked with Result::Cancel if the user closes the
+ // MessageBox without clicking on any buttons.
+ typedef base::Callback<void(Result)> ResultCallback;
+
+ MessageBox(const base::string16& title_label,
+ const base::string16& message_label,
+ const base::string16& ok_label,
+ const base::string16& cancel_label,
+ ResultCallback result_callback);
+ ~MessageBox();
+
+ void Show();
+ void Hide();
+
+ private:
+ class Core;
+ Core* core_;
+ base::ThreadChecker thread_checker_;
+
+ DISALLOW_COPY_AND_ASSIGN(MessageBox);
+};
+
+} // namespace remoting
+
+#endif // REMOTING_HOST_CHROMEOS_MESSAGE_BOX_H_
« no previous file with comments | « no previous file | remoting/host/chromeos/message_box.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698