Index: content/public/browser/content_browser_client.h |
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h |
index 7c55235a193c638264456bdcf245ed43d82ce51d..644bc917aba02669c2c90b78bba78cd19e5844aa 100644 |
--- a/content/public/browser/content_browser_client.h |
+++ b/content/public/browser/content_browser_client.h |
@@ -83,6 +83,28 @@ struct ShowDesktopNotificationHostMsgParams; |
// the observer interfaces.) |
class CONTENT_EXPORT ContentBrowserClient { |
public: |
+ struct SocketPermissionParam { |
+ enum OperationType { |
+ NONE = 0, |
+ TCP_CONNECT, |
+ TCP_LISTEN, |
+ UDP_BIND, |
+ UDP_SEND_TO, |
+ }; |
+ |
+ SocketPermissionParam(OperationType type, |
+ const std::string& host, |
+ int port) |
+ : type(type), |
+ host(host), |
+ port(port) { |
+ } |
+ |
+ OperationType type; |
+ std::string host; |
+ int port; |
ygorshenin1
2012/09/28 14:43:34
s/int/uint16_t?
Dmitry Polukhin
2012/10/01 11:00:24
Not sure. Port is declared as int in many other pl
|
+ }; |
+ |
virtual ~ContentBrowserClient() {} |
// Allows the embedder to set any number of custom BrowserMainParts |
@@ -442,9 +464,10 @@ class CONTENT_EXPORT ContentBrowserClient { |
virtual void DidCreatePpapiPlugin(BrowserPpapiHost* browser_host) {} |
// Returns true if renderer processes can use Pepper TCP/UDP sockets from |
- // the given origin. |
+ // the given origin and connection type. |
virtual bool AllowPepperSocketAPI(BrowserContext* browser_context, |
- const GURL& url); |
+ const GURL& url, |
+ const SocketPermissionParam& params); |
// Returns true if renderer processes can use private Pepper File APIs. |
virtual bool AllowPepperPrivateFileAPI(); |