Chromium Code Reviews| 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 { |
|
jam
2012/10/10 20:48:30
please move this to a separate file (the conventio
Dmitry Polukhin
2012/10/17 09:25:54
Done.
jam
2012/10/17 15:22:42
why do you say it's odd? extensions is in chrome,
Dmitry Polukhin
2012/10/18 08:57:38
** Presubmit ERRORS **
You added one or more #incl
jam
2012/10/18 15:37:15
this is because chrome\common is including from co
|
| + 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; |
| + }; |
| + |
| 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(); |