Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: remoting/host/disconnect_window.h

Issue 10384127: Chromoting: the Me2me host now presents a notification on the console allowing a user to disconnect… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_DISCONNECT_WINDOW_H 5 #ifndef REMOTING_HOST_DISCONNECT_WINDOW_H
6 #define REMOTING_HOST_DISCONNECT_WINDOW_H 6 #define REMOTING_HOST_DISCONNECT_WINDOW_H
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 12
12 namespace remoting { 13 namespace remoting {
13 14
14 class ChromotingHost; 15 class ChromotingHost;
15 16
16 class DisconnectWindow { 17 class DisconnectWindow {
17 public: 18 public:
18 19
19 enum { 20 enum {
20 kMaximumConnectedNameWidthInPixels = 400 21 kMaximumConnectedNameWidthInPixels = 400
21 }; 22 };
22 23
24 // DisconnectCallback is called when the user clicks on the Disconnect button
25 // to disconnect the session. This callback is provided as a parameter to the
26 // Show() method, and will be triggered on the UI thread.
27 typedef base::Callback<void(void)> DisconnectCallback;
28
23 virtual ~DisconnectWindow() {} 29 virtual ~DisconnectWindow() {}
24 30
25 // Show the disconnect window allowing the user to shut down |host|. 31 // Show the disconnect window allowing the user to shut down |host|.
26 virtual void Show(ChromotingHost* host, const std::string& username) = 0; 32 virtual void Show(ChromotingHost* host,
33 const DisconnectCallback& disconnect_callback,
34 const std::string& username) = 0;
27 35
28 // Hide the disconnect window. 36 // Hide the disconnect window.
29 virtual void Hide() = 0; 37 virtual void Hide() = 0;
30 38
31 static scoped_ptr<DisconnectWindow> Create(); 39 static scoped_ptr<DisconnectWindow> Create();
32 }; 40 };
33 41
34 } 42 }
35 43
36 #endif // REMOTING_HOST_DISCONNECT_WINDOW_H 44 #endif // REMOTING_HOST_DISCONNECT_WINDOW_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698