pepper_socket_utils.h revision 2a99a7e74a7f215066514fe81d2bfa6639d9eddd
1// Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_
6#define CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_
7
8#include "content/public/common/socket_permission_request.h"
9
10struct PP_NetAddress_Private;
11
12namespace content {
13
14class RenderViewHost;
15
16namespace pepper_socket_utils {
17
18SocketPermissionRequest CreateSocketPermissionRequest(
19    SocketPermissionRequest::OperationType type,
20    const PP_NetAddress_Private& net_addr);
21
22bool CanUseSocketAPIs(bool external_plugin,
23                      const SocketPermissionRequest& params,
24                      RenderViewHost* render_view_host);
25
26}  // namespace pepper_socket_utils
27
28}  // namespace content
29
30#endif  // CONTENT_BROWSER_RENDERER_HOST_PEPPER_PEPPER_SOCKET_UTILS_H_
31