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 #include "remoting/client/plugin/chromoting_instance.h" | 5 #include "remoting/client/plugin/chromoting_instance.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #if defined(OS_NACL) | 10 #if defined(OS_NACL) |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // Values returned by this function must match the | 84 // Values returned by this function must match the |
85 // remoting.ClientSession.State enum in JS code. | 85 // remoting.ClientSession.State enum in JS code. |
86 switch (state) { | 86 switch (state) { |
87 case protocol::ConnectionToHost::INITIALIZING: | 87 case protocol::ConnectionToHost::INITIALIZING: |
88 return "INITIALIZING"; | 88 return "INITIALIZING"; |
89 case protocol::ConnectionToHost::CONNECTING: | 89 case protocol::ConnectionToHost::CONNECTING: |
90 return "CONNECTING"; | 90 return "CONNECTING"; |
91 case protocol::ConnectionToHost::AUTHENTICATED: | 91 case protocol::ConnectionToHost::AUTHENTICATED: |
92 // Report the authenticated state as 'CONNECTING' to avoid changing | 92 // Report the authenticated state as 'CONNECTING' to avoid changing |
93 // the interface between the plugin and webapp. | 93 // the interface between the plugin and webapp. |
| 94 // TODO(garykac) Change to 'AUTHENTICATED' in M44 or once we've switched |
| 95 // the client to NaCl. |
94 return "CONNECTING"; | 96 return "CONNECTING"; |
95 case protocol::ConnectionToHost::CONNECTED: | 97 case protocol::ConnectionToHost::CONNECTED: |
96 return "CONNECTED"; | 98 return "CONNECTED"; |
97 case protocol::ConnectionToHost::CLOSED: | 99 case protocol::ConnectionToHost::CLOSED: |
98 return "CLOSED"; | 100 return "CLOSED"; |
99 case protocol::ConnectionToHost::FAILED: | 101 case protocol::ConnectionToHost::FAILED: |
100 return "FAILED"; | 102 return "FAILED"; |
101 } | 103 } |
102 NOTREACHED(); | 104 NOTREACHED(); |
103 return std::string(); | 105 return std::string(); |
(...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1188 | 1190 |
1189 #if !defined(OS_NACL) | 1191 #if !defined(OS_NACL) |
1190 // Log messages are forwarded to the webapp only in PNaCl version of the | 1192 // Log messages are forwarded to the webapp only in PNaCl version of the |
1191 // plugin, so ProcessLogToUI() needs to be called explicitly in the non-PNaCl | 1193 // plugin, so ProcessLogToUI() needs to be called explicitly in the non-PNaCl |
1192 // version. | 1194 // version. |
1193 ProcessLogToUI(message); | 1195 ProcessLogToUI(message); |
1194 #endif // !defined(OS_NACL) | 1196 #endif // !defined(OS_NACL) |
1195 } | 1197 } |
1196 | 1198 |
1197 } // namespace remoting | 1199 } // namespace remoting |
OLD | NEW |