Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_SOCKET_PROXY_PRIVATE_API_H_ | |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_SOCKET_PROXY_PRIVATE_API_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/timer.h" | |
| 10 #include "content/common/notification_observer.h" | |
| 11 #include "content/common/notification_registrar.h" | |
| 12 #include "chrome/browser/extensions/extension_function.h" | |
| 13 | |
| 14 class WebSocketProxyPrivateGetPassportForTCPFunction | |
| 15 : public AsyncExtensionFunction, public NotificationObserver { | |
| 16 private: | |
| 17 // ExtensionFunction implementation. | |
| 18 virtual ~WebSocketProxyPrivateGetPassportForTCPFunction() {} | |
|
Dmitry Polukhin
2011/05/16 09:41:39
Please definition to .cc file. Clang bot will comp
Denis Lagno
2011/05/17 22:15:07
Done.
| |
| 19 virtual bool RunImpl() OVERRIDE; | |
| 20 | |
| 21 // NotificationObserver implementation. | |
| 22 virtual void Observe( | |
| 23 NotificationType type, const NotificationSource& source, | |
| 24 const NotificationDetails& details) OVERRIDE; | |
| 25 | |
| 26 // Access restrictions. | |
| 27 bool CheckCredentials(const std::string& hostname, int port); | |
| 28 | |
| 29 // Finalizes async operation. | |
| 30 void Finalize(); | |
| 31 | |
| 32 // Used to signal timeout (when waiting for proxy initial launch). | |
| 33 base::OneShotTimer<WebSocketProxyPrivateGetPassportForTCPFunction> timer_; | |
| 34 | |
| 35 NotificationRegistrar registrar_; | |
| 36 | |
| 37 DECLARE_EXTENSION_FUNCTION_NAME("webSocketProxyPrivate.getPassportForTCP") | |
| 38 }; | |
| 39 | |
| 40 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_SOCKET_PROXY_PRIVATE_API_H_ | |
| OLD | NEW |