| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ | |
| 6 #define CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 namespace chromeos { | |
| 12 | |
| 13 // Controls webproxy to TCP service. | |
| 14 class WebSocketProxyController { | |
| 15 public: | |
| 16 enum ConnectionFlags { | |
| 17 PLAIN_TCP = 0, | |
| 18 TLS_OVER_TCP = 1 << 0 | |
| 19 }; | |
| 20 | |
| 21 // Can be called on any thread. Subsequent calls are cheap and do nothing. | |
| 22 static void Initiate(); | |
| 23 | |
| 24 // All methods can be called on any thread. | |
| 25 static void Shutdown(); | |
| 26 static bool IsInitiated(); | |
| 27 static int GetPort(); // Returns port listening websocket connections. | |
| 28 }; | |
| 29 | |
| 30 } // namespace chromeos | |
| 31 | |
| 32 #endif // CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ | |
| OLD | NEW |