Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_PROTOCOL_SESSION_H_ | 5 #ifndef REMOTING_PROTOCOL_SESSION_H_ |
| 6 #define REMOTING_PROTOCOL_SESSION_H_ | 6 #define REMOTING_PROTOCOL_SESSION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "remoting/protocol/errors.h" | 10 #include "remoting/protocol/errors.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 62 // |channel_name| changes. Session must not be destroyed by the | 62 // |channel_name| changes. Session must not be destroyed by the |
| 63 // handler of this event. | 63 // handler of this event. |
| 64 virtual void OnSessionRouteChange(const std::string& channel_name, | 64 virtual void OnSessionRouteChange(const std::string& channel_name, |
| 65 const TransportRoute& route) = 0; | 65 const TransportRoute& route) = 0; |
| 66 | 66 |
| 67 // Called when ready state on one of the channels changes. See | 67 // Called when ready state on one of the channels changes. See |
| 68 // comments in transport.h for explanation on what this state | 68 // comments in transport.h for explanation on what this state |
| 69 // means and how it can used. | 69 // means and how it can used. |
| 70 virtual void OnSessionChannelReady(const std::string& channel_name, | 70 virtual void OnSessionChannelReady(const std::string& channel_name, |
| 71 bool ready) {} | 71 bool ready) {} |
| 72 | |
| 73 // Called when the session begins authentication | |
| 74 virtual void OnSessionAuthenticationBegin() {}; | |
|
Sergey Ulanov
2014/03/24 18:42:36
Instead of adding this callback I think it would b
Sergey Ulanov
2014/03/24 18:42:36
If you keep this method: s/Begin/Started/ for cons
kelvinp
2014/03/24 23:11:39
Done.
kelvinp
2014/03/24 23:11:39
I have added the extra state instead
| |
| 72 }; | 75 }; |
| 73 | 76 |
| 74 | 77 |
| 75 Session() {} | 78 Session() {} |
| 76 virtual ~Session() {} | 79 virtual ~Session() {} |
| 77 | 80 |
| 78 // Set event handler for this session. |event_handler| must outlive | 81 // Set event handler for this session. |event_handler| must outlive |
| 79 // this object. | 82 // this object. |
| 80 virtual void SetEventHandler(EventHandler* event_handler) = 0; | 83 virtual void SetEventHandler(EventHandler* event_handler) = 0; |
| 81 | 84 |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 111 virtual void Close() = 0; | 114 virtual void Close() = 0; |
| 112 | 115 |
| 113 private: | 116 private: |
| 114 DISALLOW_COPY_AND_ASSIGN(Session); | 117 DISALLOW_COPY_AND_ASSIGN(Session); |
| 115 }; | 118 }; |
| 116 | 119 |
| 117 } // namespace protocol | 120 } // namespace protocol |
| 118 } // namespace remoting | 121 } // namespace remoting |
| 119 | 122 |
| 120 #endif // REMOTING_PROTOCOL_SESSION_H_ | 123 #endif // REMOTING_PROTOCOL_SESSION_H_ |
| OLD | NEW |