| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 PLAIN_TCP = 0, | 22 PLAIN_TCP = 0, |
| 23 TLS_OVER_TCP = 1 << 0 | 23 TLS_OVER_TCP = 1 << 0 |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 // Can be called on any thread. Subsequent calls are cheap and do nothing. | 26 // Can be called on any thread. Subsequent calls are cheap and do nothing. |
| 27 static void Initiate(); | 27 static void Initiate(); |
| 28 | 28 |
| 29 // All methods can be called on any thread. | 29 // All methods can be called on any thread. |
| 30 static void Shutdown(); | 30 static void Shutdown(); |
| 31 static bool IsInitiated(); | 31 static bool IsInitiated(); |
| 32 static int GetPort(); // Returns port listening websocket connections. |
| 32 | 33 |
| 33 static bool CheckCredentials( | 34 static bool CheckCredentials( |
| 34 const std::string& extension_id, | 35 const std::string& extension_id, |
| 35 const std::string& hostname, | 36 const std::string& hostname, |
| 36 unsigned short port, | 37 unsigned short port, |
| 37 ConnectionFlags); | 38 ConnectionFlags); |
| 38 }; | 39 }; |
| 39 | 40 |
| 40 } // namespace chromeos | 41 } // namespace chromeos |
| 41 | 42 |
| 42 #endif // CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ | 43 #endif // CHROME_BROWSER_CHROMEOS_WEB_SOCKET_PROXY_CONTROLLER_H_ |
| OLD | NEW |