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

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: CR feedback 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') | remoting/host/continue_window.h » ('J')
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 // Pause or unpause the session. While the session is paused, remote input 141 // Pause or unpause the session. While the session is paused, remote input
143 // is ignored. Can be called from any thread. 142 // is ignored. Can be called from any thread.
144 void PauseSession(bool pause); 143 void PauseSession(bool pause);
145 144
146 // Disconnects all active clients. Clients are disconnected 145 // Disconnects all active clients. Clients are disconnected
147 // asynchronously when this method is called on a thread other than 146 // asynchronously when this method is called on a thread other than
148 // the network thread. Potentically this may cause disconnection of 147 // the network thread. Potentically this may cause disconnection of
149 // clients that were not connected when this method is called. 148 // clients that were not connected when this method is called.
150 void DisconnectAllClients(); 149 void DisconnectAllClients();
151 150
152 const UiStrings& ui_strings() { return ui_strings_; }
153
154 // Set localized strings. Must be called before host is started.
155 void SetUiStrings(const UiStrings& ui_strings);
156
157 private: 151 private:
158 friend class base::RefCountedThreadSafe<ChromotingHost>; 152 friend class base::RefCountedThreadSafe<ChromotingHost>;
159 friend class ChromotingHostTest; 153 friend class ChromotingHostTest;
160 154
161 typedef std::vector<scoped_refptr<ClientSession> > ClientList; 155 typedef std::vector<scoped_refptr<ClientSession> > ClientList;
162 156
163 enum State { 157 enum State {
164 kInitial, 158 kInitial,
165 kStarted, 159 kStarted,
166 kStopping, 160 kStopping,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 net::BackoffEntry login_backoff_; 204 net::BackoffEntry login_backoff_;
211 205
212 // Flags used for RejectAuthenticatingClient(). 206 // Flags used for RejectAuthenticatingClient().
213 bool authenticating_client_; 207 bool authenticating_client_;
214 bool reject_authenticating_client_; 208 bool reject_authenticating_client_;
215 209
216 // Stores list of tasks that should be executed when we finish 210 // Stores list of tasks that should be executed when we finish
217 // shutdown. Used only while |state_| is set to kStopping. 211 // shutdown. Used only while |state_| is set to kStopping.
218 std::vector<base::Closure> shutdown_tasks_; 212 std::vector<base::Closure> shutdown_tasks_;
219 213
220 // TODO(sergeyu): The following members do not belong to
221 // ChromotingHost and should be moved elsewhere.
222 UiStrings ui_strings_;
223
224 // The maximum duration of any session. 214 // The maximum duration of any session.
225 base::TimeDelta max_session_duration_; 215 base::TimeDelta max_session_duration_;
226 216
227 DISALLOW_COPY_AND_ASSIGN(ChromotingHost); 217 DISALLOW_COPY_AND_ASSIGN(ChromotingHost);
228 }; 218 };
229 219
230 } // namespace remoting 220 } // namespace remoting
231 221
232 #endif // REMOTING_HOST_CHROMOTING_HOST_H_ 222 #endif // REMOTING_HOST_CHROMOTING_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/chromoting_host.cc » ('j') | remoting/host/continue_window.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698