OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_PROXIMITY_AUTH_CONNECTION_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_CONNECTION_H |
6 #define COMPONENTS_PROXIMITY_AUTH_CONNECTION_H | 6 #define COMPONENTS_PROXIMITY_AUTH_CONNECTION_H |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 const std::string& received_bytes() { return received_bytes_; } | 92 const std::string& received_bytes() { return received_bytes_; } |
93 | 93 |
94 private: | 94 private: |
95 // The remote device corresponding to this connection. | 95 // The remote device corresponding to this connection. |
96 const RemoteDevice remote_device_; | 96 const RemoteDevice remote_device_; |
97 | 97 |
98 // The current status of the connection. | 98 // The current status of the connection. |
99 Status status_; | 99 Status status_; |
100 | 100 |
101 // The registered observers of the connection. | 101 // The registered observers of the connection. |
102 ObserverList<ConnectionObserver> observers_; | 102 base::ObserverList<ConnectionObserver> observers_; |
103 | 103 |
104 // A temporary buffer storing bytes received before a received message can be | 104 // A temporary buffer storing bytes received before a received message can be |
105 // fully constructed. | 105 // fully constructed. |
106 std::string received_bytes_; | 106 std::string received_bytes_; |
107 | 107 |
108 // Whether a message is currently in the process of being sent. | 108 // Whether a message is currently in the process of being sent. |
109 bool is_sending_message_; | 109 bool is_sending_message_; |
110 | 110 |
111 DISALLOW_COPY_AND_ASSIGN(Connection); | 111 DISALLOW_COPY_AND_ASSIGN(Connection); |
112 }; | 112 }; |
113 | 113 |
114 } // namespace proximity_auth | 114 } // namespace proximity_auth |
115 | 115 |
116 #endif // COMPONENTS_PROXIMITY_AUTH_CONNECTION_H | 116 #endif // COMPONENTS_PROXIMITY_AUTH_CONNECTION_H |
OLD | NEW |