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

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

Issue 7134023: Notify calling web-app when Host plugin becomes connected to a client. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Stop accepting connections once there is one active in Me2Mom. Created 9 years, 6 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) 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_HEARTBEAT_SENDER_H_ 5 #ifndef REMOTING_HOST_HEARTBEAT_SENDER_H_
6 #define REMOTING_HOST_HEARTBEAT_SENDER_H_ 6 #define REMOTING_HOST_HEARTBEAT_SENDER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 virtual ~HeartbeatSender(); 63 virtual ~HeartbeatSender();
64 64
65 // Initializes heart-beating for |jingle_client_| with |config_|. Returns 65 // Initializes heart-beating for |jingle_client_| with |config_|. Returns
66 // false if the config is invalid (e.g. private key cannot be parsed). 66 // false if the config is invalid (e.g. private key cannot be parsed).
67 bool Init(); 67 bool Init();
68 68
69 // HostStatusObserver implementation. 69 // HostStatusObserver implementation.
70 virtual void OnSignallingConnected(SignalStrategy* signal_strategy, 70 virtual void OnSignallingConnected(SignalStrategy* signal_strategy,
71 const std::string& full_jid) OVERRIDE; 71 const std::string& full_jid) OVERRIDE;
72 virtual void OnSignallingDisconnected() OVERRIDE; 72 virtual void OnSignallingDisconnected() OVERRIDE;
73 virtual void OnAuthenticatedClientsChanged(int clients) OVERRIDE;
73 virtual void OnShutdown() OVERRIDE; 74 virtual void OnShutdown() OVERRIDE;
74 75
75 private: 76 private:
76 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza); 77 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, DoSendStanza);
77 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage); 78 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, CreateHeartbeatMessage);
78 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponse); 79 FRIEND_TEST_ALL_PREFIXES(HeartbeatSenderTest, ProcessResponse);
79 80
80 enum State { 81 enum State {
81 CREATED, 82 CREATED,
82 INITIALIZED, 83 INITIALIZED,
(...skipping 19 matching lines...) Expand all
102 scoped_ptr<IqRequest> request_; 103 scoped_ptr<IqRequest> request_;
103 int interval_ms_; 104 int interval_ms_;
104 base::RepeatingTimer<HeartbeatSender> timer_; 105 base::RepeatingTimer<HeartbeatSender> timer_;
105 106
106 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender); 107 DISALLOW_COPY_AND_ASSIGN(HeartbeatSender);
107 }; 108 };
108 109
109 } // namespace remoting 110 } // namespace remoting
110 111
111 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_ 112 #endif // REMOTING_HOST_HEARTBEAT_SENDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698