Index: remoting/protocol/client_stub.h |
diff --git a/remoting/protocol/client_stub.h b/remoting/protocol/client_stub.h |
index 4b73789b84abeb95623275e5bee259665e2447b8..ff86db8eed8a4d3dd623599a73c988d0959bb313 100644 |
--- a/remoting/protocol/client_stub.h |
+++ b/remoting/protocol/client_stub.h |
@@ -22,7 +22,7 @@ class NotifyResolutionRequest; |
class ClientStub { |
public: |
- ClientStub() {} |
+ ClientStub() : enable_(false) {} |
virtual ~ClientStub() {} |
dmac
2011/03/04 01:36:27
as this is no longer pure virtual, may have to mov
garykac
2011/03/04 05:33:24
Done.
|
virtual void NotifyResolution(const NotifyResolutionRequest* msg, |
@@ -30,7 +30,26 @@ class ClientStub { |
virtual void BeginSessionResponse(const LocalLoginStatus* msg, |
Task* done) = 0; |
+ // Enable the host->client control channel. |
+ // This should be set to true only after a trusted communication channel has |
+ // been established. |
+ // When this is false, only a limited set of control messages will be |
+ // processed. |
+ 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.
|
+ enable_ = enable; |
+ } |
+ |
+ // Is the control channel enabled? |
+ // I.e., should we be processing control events? |
+ bool Enabled() { |
dmac
2011/03/04 01:36:27
just enabled()
garykac
2011/03/04 05:33:24
SetEnabled() and enabled()?
or would set_enabled(
|
+ return enable_; |
+ } |
+ |
private: |
+ // Initially false, this controls whether the control events received from the |
+ // host should be processed. |
+ bool enable_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ClientStub); |
}; |