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"
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
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
);
42 base::ThreadChecker thread_checker_
;
44 DISALLOW_COPY_AND_ASSIGN(MessageBox
);
47 } // namespace remoting
49 #endif // REMOTING_HOST_CHROMEOS_MESSAGE_BOX_H_