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 #pragma once | |
alexeypa (please no reviews)
2012/07/09 16:22:36
#pragma once is against C++ style guide if I'm not
| |
7 | 8 |
8 #include "base/callback.h" | 9 #include "base/callback.h" |
9 | 10 |
10 namespace remoting { | 11 namespace remoting { |
11 | 12 |
12 class ChromotingHost; | 13 class ChromotingHost; |
13 | 14 |
14 class ContinueWindow { | 15 class ContinueWindow { |
15 public: | 16 public: |
16 // ContinueSessionCallback is called when the user clicks on the | 17 // ContinueSessionCallback is called when the user clicks on the |
17 // Continue button to resume the session, or dismisses the window to | 18 // Continue button to resume the session, or dismisses the window to |
18 // terminate the session. This callback is provided as a parameter to the | 19 // terminate the session. This callback is provided as a parameter to the |
19 // Show() method, and will be triggered on the UI thread. | 20 // Show() method, and will be triggered on the UI thread. |
20 typedef base::Callback<void(bool)> ContinueSessionCallback; | 21 typedef base::Callback<void(bool)> ContinueSessionCallback; |
21 | 22 |
22 virtual ~ContinueWindow() {} | 23 virtual ~ContinueWindow() {} |
23 | 24 |
24 // Show the continuation window requesting that the user approve continuing | 25 // Show the continuation window requesting that the user approve continuing |
25 // the session. | 26 // the session. |
26 virtual void Show(ChromotingHost* host, | 27 virtual void Show(ChromotingHost* host, |
27 const ContinueSessionCallback& callback) = 0; | 28 const ContinueSessionCallback& callback) = 0; |
28 | 29 |
29 // Hide the continuation window if it is visible. | 30 // Hide the continuation window if it is visible. |
30 virtual void Hide() = 0; | 31 virtual void Hide() = 0; |
31 | 32 |
32 static scoped_ptr<ContinueWindow> Create(); | 33 static scoped_ptr<ContinueWindow> Create(); |
33 }; | 34 }; |
34 | 35 |
35 } | 36 } // namespace remoting |
36 | 37 |
37 #endif // REMOTING_HOST_CONTINUE_WINDOW_H | 38 #endif // REMOTING_HOST_CONTINUE_WINDOW_H_ |
OLD | NEW |