Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Side by Side Diff: chrome/browser/extensions/extension_web_socket_proxy_private_api.h

Issue 6683060: Private API for extensions like ssh-client that need access to TCP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed bugs + added apitest + rebased Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698