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

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

Issue 8495024: Access ChromotingHost::clients_ only on network thread. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years, 1 month 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
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_STATUS_OBSERVER_H_ 5 #ifndef REMOTING_HOST_STATUS_OBSERVER_H_
6 #define REMOTING_HOST_STATUS_OBSERVER_H_ 6 #define REMOTING_HOST_STATUS_OBSERVER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace remoting { 10 namespace remoting {
11 class SignalStrategy; 11 class SignalStrategy;
12 12
13 namespace protocol { 13 namespace protocol {
14 class ConnectionToClient; 14 class ConnectionToClient;
15 } 15 }
16 16
17 // Interface for host status observer. All methods are invoked on the
18 // network thread.
17 class HostStatusObserver { 19 class HostStatusObserver {
18 public: 20 public:
19 HostStatusObserver() { } 21 HostStatusObserver() { }
20 virtual ~HostStatusObserver() { } 22 virtual ~HostStatusObserver() { }
21 23
22 // Called on the network thread when status of the XMPP changes. 24 // Called when status of the signalling channel changes.
23 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, 25 virtual void OnSignallingConnected(SignalStrategy* signal_strategy,
24 const std::string& full_jid) = 0; 26 const std::string& full_jid) = 0;
25 virtual void OnSignallingDisconnected() = 0; 27 virtual void OnSignallingDisconnected() = 0;
26 28
27 // Called on the network thread when an unauthorized user attempts 29 // Called when an unauthorized user attempts to connect to the host.
28 // to connect to the host.
29 virtual void OnAccessDenied() = 0; 30 virtual void OnAccessDenied() = 0;
30 31
31 // Called on the main thread when a client authenticates, or disconnects. 32 // Called when a client authenticates, or disconnects. Observers
32 // The observer must not tear-down ChromotingHost state on receipt of 33 // must not tear-down ChromotingHost state on receipt of this
33 // this callback; it is purely informational. 34 // callback; it is purely informational.
34 virtual void OnClientAuthenticated(const std::string& jid) = 0; 35 virtual void OnClientAuthenticated(const std::string& jid) = 0;
35 virtual void OnClientDisconnected(const std::string& jid) = 0; 36 virtual void OnClientDisconnected(const std::string& jid) = 0;
36 37
37 // Called on the main thread when the host shuts down. 38 // Called when the host shuts down.
38 virtual void OnShutdown() = 0; 39 virtual void OnShutdown() = 0;
39 }; 40 };
40 41
41 } // namespace remoting 42 } // namespace remoting
42 43
43 #endif // REMOTING_HOST_STATUS_OBSERVER_H_ 44 #endif // REMOTING_HOST_STATUS_OBSERVER_H_
OLDNEW
« no previous file with comments | « remoting/host/client_session_unittest.cc ('k') | remoting/host/plugin/host_script_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698