Roll src/third_party/WebKit 8b42d1d:744641d (svn 186770:186771)
[chromium-blink-merge.git] / chrome / browser / plugins / chrome_content_browser_client_plugins_part.h
blob5b2eadb178a2f0fd64e55c3f72246fa54560c74d
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"
12 namespace plugins {
14 // Implements the plugins portion of ChromeContentBrowserClient.
15 class ChromeContentBrowserClientPluginsPart
16 : public ChromeContentBrowserClientParts {
17 public:
18 ChromeContentBrowserClientPluginsPart();
19 virtual ~ChromeContentBrowserClientPluginsPart();
21 // Corresponding to the ChromeContentBrowserClient function of the same name.
22 static bool IsPluginAllowedToUseDevChannelAPIs(
23 content::BrowserContext* browser_context,
24 const GURL& url,
25 const std::set<std::string>& allowed_dev_channel_origins);
27 static bool AllowPepperSocketAPI(
28 content::BrowserContext* browser_context,
29 const GURL& url,
30 bool private_api,
31 const content::SocketPermissionRequest* params,
32 const std::set<std::string>& allowed_socket_origin);
34 static bool IsPluginAllowedToCallRequestOSFileHandle(
35 content::BrowserContext* browser_context,
36 const GURL& url,
37 const std::set<std::string>& allowed_file_handle_origins);
39 static void DidCreatePpapiPlugin(content::BrowserPpapiHost* browser_host);
41 private:
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_