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

Side by Side Diff: remoting/host/chromoting_host.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
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | remoting/host/chromoting_host.cc » ('J')
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_CHROMOTING_HOST_H_ 5 #ifndef REMOTING_CHROMOTING_HOST_H_
6 #define REMOTING_CHROMOTING_HOST_H_ 6 #define REMOTING_CHROMOTING_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 116
117 // Callback for ChromotingServer. 117 // Callback for ChromotingServer.
118 void OnNewClientSession( 118 void OnNewClientSession(
119 protocol::Session* session, 119 protocol::Session* session,
120 protocol::SessionManager::IncomingSessionResponse* response); 120 protocol::SessionManager::IncomingSessionResponse* response);
121 121
122 // Sets desired configuration for the protocol. Ownership of the 122 // Sets desired configuration for the protocol. Ownership of the
123 // |config| is transferred to the object. Must be called before Start(). 123 // |config| is transferred to the object. Must be called before Start().
124 void set_protocol_config(protocol::CandidateSessionConfig* config); 124 void set_protocol_config(protocol::CandidateSessionConfig* config);
125 125
126 // TODO(wez): ChromotingHost shouldn't need to know about Me2Mom.
Jamie 2011/06/10 18:00:38 +1, although I don't think that half the lines in
Wez 2011/06/13 20:30:35 You're no fun. ;)
126 void set_me2mom(bool is_me2mom) { 127 void set_me2mom(bool is_me2mom) {
127 is_me2mom_ = is_me2mom; 128 is_me2mom_ = is_me2mom;
128 } 129 }
129 130
130 private: 131 private:
131 friend class base::RefCountedThreadSafe<ChromotingHost>; 132 friend class base::RefCountedThreadSafe<ChromotingHost>;
132 friend class ChromotingHostTest; 133 friend class ChromotingHostTest;
133 134
134 typedef std::vector<scoped_refptr<HostStatusObserver> > StatusObserverList; 135 typedef std::vector<scoped_refptr<HostStatusObserver> > StatusObserverList;
135 typedef std::vector<scoped_refptr<ClientSession> > ClientList; 136 typedef std::vector<scoped_refptr<ClientSession> > ClientList;
(...skipping 16 matching lines...) Expand all
152 void OnServerClosed(); 153 void OnServerClosed();
153 154
154 // This method is called if a client is disconnected from the host. 155 // This method is called if a client is disconnected from the host.
155 void OnClientDisconnected(protocol::ConnectionToClient* client); 156 void OnClientDisconnected(protocol::ConnectionToClient* client);
156 157
157 // Creates encoder for the specified configuration. 158 // Creates encoder for the specified configuration.
158 Encoder* CreateEncoder(const protocol::SessionConfig* config); 159 Encoder* CreateEncoder(const protocol::SessionConfig* config);
159 160
160 std::string GenerateHostAuthToken(const std::string& encoded_client_token); 161 std::string GenerateHostAuthToken(const std::string& encoded_client_token);
161 162
162 bool HasAuthenticatedClients() const; 163 int AuthenticatedClientsCount() const;
163 164
164 void EnableCurtainMode(bool enable); 165 void EnableCurtainMode(bool enable);
165 166
166 void ProcessPreAuthentication( 167 void ProcessPreAuthentication(
167 const scoped_refptr<protocol::ConnectionToClient>& connection); 168 const scoped_refptr<protocol::ConnectionToClient>& connection);
168 169
169 // The context that the chromoting host runs on. 170 // The context that the chromoting host runs on.
170 ChromotingHostContext* context_; 171 ChromotingHostContext* context_;
171 172
172 scoped_refptr<MutableHostConfig> config_; 173 scoped_refptr<MutableHostConfig> config_;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 base::Lock lock_; 205 base::Lock lock_;
205 206
206 // Configuration of the protocol. 207 // Configuration of the protocol.
207 scoped_ptr<protocol::CandidateSessionConfig> protocol_config_; 208 scoped_ptr<protocol::CandidateSessionConfig> protocol_config_;
208 209
209 // Whether or not the host is currently curtained. 210 // Whether or not the host is currently curtained.
210 bool is_curtained_; 211 bool is_curtained_;
211 212
212 // Whether or not the host is running in "Me2Mom" mode, in which connections 213 // Whether or not the host is running in "Me2Mom" mode, in which connections
213 // are pre-authenticated, and hence the local login challenge can be bypassed. 214 // are pre-authenticated, and hence the local login challenge can be bypassed.
215 // TODO(wez): ChromotingHost shouldn't need to know about Me2Mom.
214 bool is_me2mom_; 216 bool is_me2mom_;
215 217
216 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); 218 DISALLOW_COPY_AND_ASSIGN(ChromotingHost);
217 }; 219 };
218 220
219 } // namespace remoting 221 } // namespace remoting
220 222
221 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ 223 #endif // REMOTING_HOST_CHROMOTING_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | remoting/host/chromoting_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698