1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_PLUGINS_CHROME_CONTENT_BROWSER_CLIENT_PLUGINS_PART_H_
6 #define CHROME_BROWSER_PLUGINS_CHROME_CONTENT_BROWSER_CLIENT_PLUGINS_PART_H_
8 #include "chrome/browser/chrome_content_browser_client_parts.h"
9 #include "content/public/browser/browser_ppapi_host.h"
10 #include "content/public/common/socket_permission_request.h"
14 // Implements the plugins portion of ChromeContentBrowserClient.
15 class ChromeContentBrowserClientPluginsPart
16 : public ChromeContentBrowserClientParts
{
18 ChromeContentBrowserClientPluginsPart();
19 ~ChromeContentBrowserClientPluginsPart() override
;
21 // Corresponding to the ChromeContentBrowserClient function of the same name.
22 static bool IsPluginAllowedToUseDevChannelAPIs(
23 content::BrowserContext
* browser_context
,
25 const std::set
<std::string
>& allowed_dev_channel_origins
);
27 static bool AllowPepperSocketAPI(
28 content::BrowserContext
* browser_context
,
31 const content::SocketPermissionRequest
* params
,
32 const std::set
<std::string
>& allowed_socket_origin
);
34 static bool IsPluginAllowedToCallRequestOSFileHandle(
35 content::BrowserContext
* browser_context
,
37 const std::set
<std::string
>& allowed_file_handle_origins
);
39 static void DidCreatePpapiPlugin(content::BrowserPpapiHost
* browser_host
);
42 // ChromeContentBrowserClientParts:
43 void RenderProcessWillLaunch(content::RenderProcessHost
* host
) override
;
45 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientPluginsPart
);
48 } // namespace plugins
50 #endif // CHROME_BROWSER_PLUGINS_CHROME_CONTENT_BROWSER_CLIENT_PLUGINS_PART_H_