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/chromoting_host.h

Issue 11886051: Turned UiStrings into a singleton so that the continue window does not depend on ChromotingHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 11 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') | 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) 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_CHROMOTING_HOST_H_ 5 #ifndef REMOTING_HOST_CHROMOTING_HOST_H_
6 #define REMOTING_HOST_CHROMOTING_HOST_H_ 6 #define REMOTING_HOST_CHROMOTING_HOST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/observer_list.h" 13 #include "base/observer_list.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "net/base/backoff_entry.h" 15 #include "net/base/backoff_entry.h"
16 #include "remoting/host/client_session.h" 16 #include "remoting/host/client_session.h"
17 #include "remoting/host/host_key_pair.h" 17 #include "remoting/host/host_key_pair.h"
18 #include "remoting/host/host_status_observer.h" 18 #include "remoting/host/host_status_observer.h"
19 #include "remoting/host/mouse_move_observer.h" 19 #include "remoting/host/mouse_move_observer.h"
20 #include "remoting/host/ui_strings.h"
21 #include "remoting/protocol/authenticator.h" 20 #include "remoting/protocol/authenticator.h"
22 #include "remoting/protocol/session_manager.h" 21 #include "remoting/protocol/session_manager.h"
23 #include "remoting/protocol/connection_to_client.h" 22 #include "remoting/protocol/connection_to_client.h"
24 #include "third_party/skia/include/core/SkSize.h" 23 #include "third_party/skia/include/core/SkSize.h"
25 24
26 namespace base { 25 namespace base {
27 class SingleThreadTaskRunner; 26 class SingleThreadTaskRunner;
28 } // namespace base 27 } // namespace base
29 28
30 namespace remoting { 29 namespace remoting {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 // Pause or unpause the session. While the session is paused, remote input 143 // Pause or unpause the session. While the session is paused, remote input
145 // is ignored. Can be called from any thread. 144 // is ignored. Can be called from any thread.
146 void PauseSession(bool pause); 145 void PauseSession(bool pause);
147 146
148 // Disconnects all active clients. Clients are disconnected 147 // Disconnects all active clients. Clients are disconnected
149 // asynchronously when this method is called on a thread other than 148 // asynchronously when this method is called on a thread other than
150 // the network thread. Potentically this may cause disconnection of 149 // the network thread. Potentically this may cause disconnection of
151 // clients that were not connected when this method is called. 150 // clients that were not connected when this method is called.
152 void DisconnectAllClients(); 151 void DisconnectAllClients();
153 152
154 const UiStrings& ui_strings() { return ui_strings_; }
155
156 // Set localized strings. Must be called before host is started.
157 void SetUiStrings(const UiStrings& ui_strings);
158
159 private: 153 private:
160 friend class base::RefCountedThreadSafe<ChromotingHost>; 154 friend class base::RefCountedThreadSafe<ChromotingHost>;
161 friend class ChromotingHostTest; 155 friend class ChromotingHostTest;
162 156
163 typedef std::vector<scoped_refptr<ClientSession> > ClientList; 157 typedef std::vector<scoped_refptr<ClientSession> > ClientList;
164 158
165 enum State { 159 enum State {
166 kInitial, 160 kInitial,
167 kStarted, 161 kStarted,
168 kStopping, 162 kStopping,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 net::BackoffEntry login_backoff_; 200 net::BackoffEntry login_backoff_;
207 201
208 // Flags used for RejectAuthenticatingClient(). 202 // Flags used for RejectAuthenticatingClient().
209 bool authenticating_client_; 203 bool authenticating_client_;
210 bool reject_authenticating_client_; 204 bool reject_authenticating_client_;
211 205
212 // Stores list of tasks that should be executed when we finish 206 // Stores list of tasks that should be executed when we finish
213 // shutdown. Used only while |state_| is set to kStopping. 207 // shutdown. Used only while |state_| is set to kStopping.
214 std::vector<base::Closure> shutdown_tasks_; 208 std::vector<base::Closure> shutdown_tasks_;
215 209
216 // TODO(sergeyu): The following members do not belong to
217 // ChromotingHost and should be moved elsewhere.
218 UiStrings ui_strings_;
219
220 // The maximum duration of any session. 210 // The maximum duration of any session.
221 base::TimeDelta max_session_duration_; 211 base::TimeDelta max_session_duration_;
222 212
223 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); 213 DISALLOW_COPY_AND_ASSIGN(ChromotingHost);
224 }; 214 };
225 215
226 } // namespace remoting 216 } // namespace remoting
227 217
228 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ 218 #endif // REMOTING_HOST_CHROMOTING_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698