Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / remoting / host / chromeos / message_box.h
blob2ff6c526970adf1474554537e0fdca9e6f6c2cd0
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_CHROMEOS_MESSAGE_BOX_H_
6 #define REMOTING_HOST_CHROMEOS_MESSAGE_BOX_H_
8 #include "base/callback_helpers.h"
9 #include "base/strings/string16.h"
10 #include "base/threading/thread_checker.h"
12 namespace remoting {
14 // Overview:
15 // Shows a system modal message box with OK and cancel buttons. This class
16 // is not thread-safe, it must be called on the UI thread of the browser
17 // process.
18 class MessageBox {
19 public:
20 enum Result {
21 OK,
22 CANCEL
25 // ResultCallback will be invoked with Result::Cancel if the user closes the
26 // MessageBox without clicking on any buttons.
27 typedef base::Callback<void(Result)> ResultCallback;
29 MessageBox(const base::string16& title_label,
30 const base::string16& message_label,
31 const base::string16& ok_label,
32 const base::string16& cancel_label,
33 ResultCallback result_callback);
34 ~MessageBox();
36 void Show();
37 void Hide();
39 private:
40 class Core;
41 Core* core_;
42 base::ThreadChecker thread_checker_;
44 DISALLOW_COPY_AND_ASSIGN(MessageBox);
47 } // namespace remoting
49 #endif // REMOTING_HOST_CHROMEOS_MESSAGE_BOX_H_