OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef REMOTING_HOST_CONTINUE_WINDOW_H_ | 5 #ifndef REMOTING_HOST_CONTINUE_WINDOW_H_ |
6 #define REMOTING_HOST_CONTINUE_WINDOW_H_ | 6 #define REMOTING_HOST_CONTINUE_WINDOW_H_ |
7 | 7 |
8 #include "base/callback.h" | 8 #include "base/callback.h" |
9 | 9 |
10 namespace remoting { | 10 namespace remoting { |
11 | 11 |
12 class ChromotingHost; | 12 struct UiStrings; |
13 | 13 |
14 class ContinueWindow { | 14 class ContinueWindow { |
15 public: | 15 public: |
16 // ContinueSessionCallback is called when the user clicks on the | 16 // ContinueSessionCallback is called when the user clicks on the |
17 // Continue button to resume the session, or dismisses the window to | 17 // Continue button to resume the session, or dismisses the window to |
18 // terminate the session. This callback is provided as a parameter to the | 18 // terminate the session. This callback is provided as a parameter to the |
19 // Show() method, and will be triggered on the UI thread. | 19 // Show() method, and will be triggered on the UI thread. |
20 typedef base::Callback<void(bool)> ContinueSessionCallback; | 20 typedef base::Callback<void(bool)> ContinueSessionCallback; |
21 | 21 |
22 virtual ~ContinueWindow() {} | 22 virtual ~ContinueWindow() {} |
23 | 23 |
24 // Show the continuation window requesting that the user approve continuing | 24 // Show the continuation window requesting that the user approve continuing |
25 // the session. | 25 // the session. |
26 virtual void Show(ChromotingHost* host, | 26 virtual void Show(const ContinueSessionCallback& callback) = 0; |
27 const ContinueSessionCallback& callback) = 0; | |
28 | 27 |
29 // Hide the continuation window if it is visible. | 28 // Hide the continuation window if it is visible. |
30 virtual void Hide() = 0; | 29 virtual void Hide() = 0; |
31 | 30 |
32 static scoped_ptr<ContinueWindow> Create(); | 31 static scoped_ptr<ContinueWindow> Create(const UiStrings* ui_strings); |
33 }; | 32 }; |
34 | 33 |
35 } // namespace remoting | 34 } // namespace remoting |
36 | 35 |
37 #endif // REMOTING_HOST_CONTINUE_WINDOW_H_ | 36 #endif // REMOTING_HOST_CONTINUE_WINDOW_H_ |
OLD | NEW |