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 bool RunImpl() OVERRIDE; |
| 19 |
| 20 // NotificationObserver implementation. |
| 21 virtual void Observe( |
| 22 NotificationType type, const NotificationSource& source, |
| 23 const NotificationDetails& details) OVERRIDE; |
| 24 |
| 25 // Finalizes async operation. |
| 26 void Finalize(); |
| 27 |
| 28 // Used to signal timeout (when waiting for proxy initial launch). |
| 29 base::OneShotTimer<WebSocketProxyPrivateGetPassportForTCPFunction> timer_; |
| 30 |
| 31 NotificationRegistrar registrar_; |
| 32 |
| 33 DECLARE_EXTENSION_FUNCTION_NAME("webSocketProxyPrivate.getPassportForTCP") |
| 34 }; |
| 35 |
| 36 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_WEB_SOCKET_PROXY_PRIVATE_API_H_ |
OLD | NEW |