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

Side by Side Diff: remoting/protocol/host_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: fix mock objects for unittests 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 host that receives commands from a Chromoting client. 5 // Interface of a host that receives commands from a Chromoting client.
6 // 6 //
7 // This interterface handles control messages defined in contro.proto. 7 // This interface handles control messages defined in contro.proto.
8 8
9 #ifndef REMOTING_PROTOCOL_HOST_STUB_H_ 9 #ifndef REMOTING_PROTOCOL_HOST_STUB_H_
10 #define REMOTING_PROTOCOL_HOST_STUB_H_ 10 #define REMOTING_PROTOCOL_HOST_STUB_H_
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 13
14 class Task; 14 class Task;
15 15
16 namespace remoting { 16 namespace remoting {
17 namespace protocol { 17 namespace protocol {
18 18
19 class SuggestResolutionRequest; 19 class SuggestResolutionRequest;
20 class LocalLoginCredentials; 20 class LocalLoginCredentials;
21 21
22 class HostStub { 22 class HostStub {
23 public: 23 public:
24 HostStub() {} 24 HostStub() : enable_(false) {}
25 virtual ~HostStub() {}; 25 virtual ~HostStub() {};
dmac 2011/03/04 01:36:27 since this is no longer pure virtual, move out of
garykac 2011/03/04 05:33:24 Done.
26 26
27 virtual void SuggestResolution( 27 virtual void SuggestResolution(
28 const SuggestResolutionRequest* msg, Task* done) = 0; 28 const SuggestResolutionRequest* msg, Task* done) = 0;
29 virtual void BeginSessionRequest( 29 virtual void BeginSessionRequest(
30 const LocalLoginCredentials* credentials, Task* done) = 0; 30 const LocalLoginCredentials* credentials, Task* done) = 0;
31 31
32 // Enable the client->host control channel.
33 // This should be set to true only after a trusted communication channel has
34 // been established.
35 // When this is false, only a limited set of control messages will be
36 // processed.
37 void SetEnable(bool enable) {
dmac 2011/03/04 01:36:27 actually the var name should probably be enabled,
garykac 2011/03/04 05:33:24 Done.
38 enable_ = enable;
39 }
40
41 // Is the control channel enabled?
42 // I.e., should we be processing control events?
43 bool Enabled() {
44 return enable_;
45 }
46
32 private: 47 private:
48 // Initially false, this controls whether the control events received from the
49 // client should be processed.
50 bool enable_;
51
33 DISALLOW_COPY_AND_ASSIGN(HostStub); 52 DISALLOW_COPY_AND_ASSIGN(HostStub);
34 }; 53 };
35 54
36 } // namespace protocol 55 } // namespace protocol
37 } // namespace remoting 56 } // namespace remoting
38 57
39 #endif // REMOTING_PROTOCOL_HOST_STUB_H_ 58 #endif // REMOTING_PROTOCOL_HOST_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698