Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 5 #ifndef REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
| 6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 6 #define REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 // | 65 // |
| 66 // After this method is called all the send method calls will be ignored. | 66 // After this method is called all the send method calls will be ignored. |
| 67 virtual void Disconnect(); | 67 virtual void Disconnect(); |
| 68 | 68 |
| 69 // Send encoded update stream data to the viewer. | 69 // Send encoded update stream data to the viewer. |
| 70 virtual VideoStub* video_stub(); | 70 virtual VideoStub* video_stub(); |
| 71 | 71 |
| 72 // Return pointer to ClientStub. | 72 // Return pointer to ClientStub. |
| 73 virtual ClientStub* client_stub(); | 73 virtual ClientStub* client_stub(); |
| 74 | 74 |
| 75 // Record whether the client has been properly authenticated with the host. | |
| 76 void SetClientAuthenticated(bool auth); | |
| 77 | |
| 75 protected: | 78 protected: |
| 76 // Protected constructor used by unit test. | 79 // Protected constructor used by unit test. |
| 77 ConnectionToClient(); | 80 //ConnectionToClient(); |
|
dmac
2011/03/04 01:36:27
should we get rid of this then?
garykac
2011/03/04 05:33:24
oops
| |
| 78 | 81 |
| 79 private: | 82 private: |
| 80 // Callback for protocol Session. | 83 // Callback for protocol Session. |
| 81 void OnSessionStateChange(Session::State state); | 84 void OnSessionStateChange(Session::State state); |
| 82 | 85 |
| 83 // Process a libjingle state change event on the |loop_|. | 86 // Process a libjingle state change event on the |loop_|. |
| 84 void StateChangeTask(Session::State state); | 87 void StateChangeTask(Session::State state); |
| 85 | 88 |
| 86 void OnClosed(); | 89 void OnClosed(); |
| 87 | 90 |
| 91 // Initially false, this is set to true once the client has authenticated | |
| 92 // properly. When this is false, many client messages (like input events) | |
| 93 // will be silently ignored. | |
|
dmac
2011/03/04 01:36:27
will they be silently ignored? or will LOGs occur?
garykac
2011/03/04 05:33:24
They should LOG, so I removed "silently"
| |
| 94 bool client_authenticated_; | |
| 95 | |
| 88 // The libjingle channel used to send and receive data from the remote client. | 96 // The libjingle channel used to send and receive data from the remote client. |
| 89 scoped_refptr<Session> session_; | 97 scoped_refptr<Session> session_; |
| 90 | 98 |
| 91 scoped_ptr<VideoWriter> video_writer_; | 99 scoped_ptr<VideoWriter> video_writer_; |
| 92 | 100 |
| 93 // ClientStub for sending messages to the client. | 101 // ClientStub for sending messages to the client. |
| 94 scoped_ptr<ClientStub> client_stub_; | 102 scoped_ptr<ClientStub> client_stub_; |
| 95 | 103 |
| 96 // The message loop that this object runs on. | 104 // The message loop that this object runs on. |
| 97 MessageLoop* loop_; | 105 MessageLoop* loop_; |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 108 // Dispatcher for submitting messages to stubs. | 116 // Dispatcher for submitting messages to stubs. |
| 109 scoped_ptr<HostMessageDispatcher> dispatcher_; | 117 scoped_ptr<HostMessageDispatcher> dispatcher_; |
| 110 | 118 |
| 111 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); | 119 DISALLOW_COPY_AND_ASSIGN(ConnectionToClient); |
| 112 }; | 120 }; |
| 113 | 121 |
| 114 } // namespace protocol | 122 } // namespace protocol |
| 115 } // namespace remoting | 123 } // namespace remoting |
| 116 | 124 |
| 117 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ | 125 #endif // REMOTING_PROTOCOL_CONNECTION_TO_CLIENT_H_ |
| OLD | NEW |