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

Side by Side Diff: remoting/protocol/client_stub.h

Issue 6594138: Block event processing on host/client until the client has authenticated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add missing source files Created 9 years, 9 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Interface of a client that receives commands from a Chromoting host. 5 // Interface of a client that receives commands from a Chromoting host.
6 // 6 //
7 // This interface is responsible for a subset of control messages sent to 7 // This interface is responsible for a subset of control messages sent to
8 // the Chromoting client. 8 // the Chromoting client.
9 9
10 #ifndef REMOTING_PROTOCOL_CLIENT_STUB_H_ 10 #ifndef REMOTING_PROTOCOL_CLIENT_STUB_H_
11 #define REMOTING_PROTOCOL_CLIENT_STUB_H_ 11 #define REMOTING_PROTOCOL_CLIENT_STUB_H_
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 14
15 class Task; 15 class Task;
16 16
17 namespace remoting { 17 namespace remoting {
18 namespace protocol { 18 namespace protocol {
19 19
20 class LocalLoginStatus; 20 class LocalLoginStatus;
21 class NotifyResolutionRequest; 21 class NotifyResolutionRequest;
22 22
23 class ClientStub { 23 class ClientStub {
24 public: 24 public:
25 ClientStub() {} 25 ClientStub();
Wez 2011/03/04 12:09:38 Is there a more descriptive name we can attached t
garykac 2011/03/04 20:28:02 I agree that it would be nice to have better names
26 virtual ~ClientStub() {} 26 virtual ~ClientStub();
27 27
28 virtual void NotifyResolution(const NotifyResolutionRequest* msg, 28 virtual void NotifyResolution(const NotifyResolutionRequest* msg,
29 Task* done) = 0; 29 Task* done) = 0;
30 virtual void BeginSessionResponse(const LocalLoginStatus* msg, 30 virtual void BeginSessionResponse(const LocalLoginStatus* msg,
31 Task* done) = 0; 31 Task* done) = 0;
32 32
33 // Enable the host->client control channel.
34 // This should be set to true only after a trusted communication channel has
35 // been established.
36 // When this is false, only a limited set of control messages will be
37 // processed.
38 void SetEnabled(bool enabled);
39
Wez 2011/03/04 12:09:38 Move from SetEnabled(bool) to OnAuthenticated()?
garykac 2011/03/04 20:28:02 Done.
40 // Is the control channel enabled?
41 // I.e., should we be processing control events?
42 bool enabled();
Wez 2011/03/04 12:09:38 Do we need this?
garykac 2011/03/04 20:28:02 The message dispatchers make use of this to cut of
43
33 private: 44 private:
45 // Initially false, this controls whether the control events received from
46 // the host should be processed.
47 bool enabled_;
48
34 DISALLOW_COPY_AND_ASSIGN(ClientStub); 49 DISALLOW_COPY_AND_ASSIGN(ClientStub);
35 }; 50 };
36 51
37 } // namespace protocol 52 } // namespace protocol
38 } // namespace remoting 53 } // namespace remoting
39 54
40 #endif // REMOTING_PROTOCOL_CLIENT_STUB_H_ 55 #endif // REMOTING_PROTOCOL_CLIENT_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698