| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef REMOTING_HOST_DISCONNECT_WINDOW_H_ | |
| 6 #define REMOTING_HOST_DISCONNECT_WINDOW_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/callback.h" | |
| 11 #include "base/memory/scoped_ptr.h" | |
| 12 | |
| 13 namespace remoting { | |
| 14 | |
| 15 struct UiStrings; | |
| 16 | |
| 17 class DisconnectWindow { | |
| 18 public: | |
| 19 enum { | |
| 20 kMaximumConnectedNameWidthInPixels = 400 | |
| 21 }; | |
| 22 | |
| 23 virtual ~DisconnectWindow() {} | |
| 24 | |
| 25 // Shows the disconnect window, allowing the user to disconnect the session. | |
| 26 // |disconnect_callback| will be invoked on the calling UI thread when the | |
| 27 // user chooses to disconnect, or if the window is closed by any means other | |
| 28 // than Hide(), or deletion of the DisconnectWindow instance. | |
| 29 // Show returns false if the window cannot be shown, in which case the | |
| 30 // callback will not be invoked. | |
| 31 virtual bool Show(const base::Closure& disconnect_callback, | |
| 32 const std::string& username) = 0; | |
| 33 | |
| 34 // Hides the disconnect window. The disconnect callback will not be invoked. | |
| 35 virtual void Hide() = 0; | |
| 36 | |
| 37 // |ui_strings| specifies localized strings to be used by the window. | |
| 38 // |ui_strings| must outlive the returned object. | |
| 39 static scoped_ptr<DisconnectWindow> Create(const UiStrings* ui_strings); | |
| 40 }; | |
| 41 | |
| 42 } // namespace remoting | |
| 43 | |
| 44 #endif // REMOTING_HOST_DISCONNECT_WINDOW_H_ | |
| OLD | NEW |