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

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
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 XMPP changes.
Wez 2011/11/09 02:32:22 nit: status of the XMPP signalling layer?
Sergey Ulanov 2011/11/09 21:24:00 Done.
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
28 // to connect to the host. 30 // to connect to the host.
Wez 2011/11/09 02:32:22 nit: line-wrap.
Sergey Ulanov 2011/11/09 21:24:00 Done.
29 virtual void OnAccessDenied() = 0; 31 virtual void OnAccessDenied() = 0;
30 32
31 // Called on the main thread when a client authenticates, or disconnects. 33 // Called when a client authenticates, or disconnects. The observer
32 // The observer must not tear-down ChromotingHost state on receipt of 34 // must not tear-down ChromotingHost state on receipt of this
33 // this callback; it is purely informational. 35 // callback; it is purely informational.
Wez 2011/11/09 02:32:22 nit: Incorrect plural/singular.
Sergey Ulanov 2011/11/09 21:24:00 Changed s/the observer/observers/, but not sure if
Wez 2011/11/09 23:18:45 Sorry, not a very helpful comment from me. New te
34 virtual void OnClientAuthenticated(const std::string& jid) = 0; 36 virtual void OnClientAuthenticated(const std::string& jid) = 0;
35 virtual void OnClientDisconnected(const std::string& jid) = 0; 37 virtual void OnClientDisconnected(const std::string& jid) = 0;
36 38
37 // Called on the main thread when the host shuts down. 39 // Called when the host shuts down.
38 virtual void OnShutdown() = 0; 40 virtual void OnShutdown() = 0;
39 }; 41 };
40 42
41 } // namespace remoting 43 } // namespace remoting
42 44
43 #endif // REMOTING_HOST_STATUS_OBSERVER_H_ 45 #endif // REMOTING_HOST_STATUS_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698