OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_PLUGINS_CHROME_CONTENT_BROWSER_CLIENT_PLUGINS_PART_H_ |
| 6 #define CHROME_BROWSER_PLUGINS_CHROME_CONTENT_BROWSER_CLIENT_PLUGINS_PART_H_ |
| 7 |
| 8 #include "chrome/browser/chrome_content_browser_client_parts.h" |
| 9 #include "content/public/common/socket_permission_request.h" |
| 10 |
| 11 namespace plugins { |
| 12 |
| 13 // Implements the extensions portion of ChromeContentBrowserClient. |
| 14 class ChromeContentBrowserClientPluginsPart { |
| 15 public: |
| 16 ChromeContentBrowserClientPluginsPart(); |
| 17 virtual ~ChromeContentBrowserClientPluginsPart(); |
| 18 |
| 19 public: |
| 20 bool IsPluginAllowedToUseDevChannelAPIs( |
| 21 content::BrowserContext* browser_context, |
| 22 const GURL& url); |
| 23 |
| 24 bool AllowPepperSocketAPI(content::BrowserContext* browser_context, |
| 25 const GURL& url, |
| 26 bool private_api, |
| 27 const content::SocketPermissionRequest* params); |
| 28 |
| 29 bool IsPluginAllowedToCallRequestOSFileHandle( |
| 30 content::BrowserContext* browser_context, |
| 31 const GURL& url); |
| 32 |
| 33 // ChromeContentBrowserClientParts: |
| 34 void RenderProcessWillLaunch(content::RenderProcessHost* host); |
| 35 |
| 36 private: |
| 37 // Set of origins that can use TCP/UDP private APIs from NaCl. |
| 38 std::set<std::string> allowed_socket_origins_; |
| 39 // Set of origins that can get a handle for FileIO from NaCl. |
| 40 std::set<std::string> allowed_file_handle_origins_; |
| 41 // Set of origins that can use "dev chanel" APIs from NaCl, even on stable |
| 42 // versions of Chrome. |
| 43 std::set<std::string> allowed_dev_channel_origins_; |
| 44 |
| 45 DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientPluginsPart); |
| 46 }; |
| 47 |
| 48 } // namespace plugins |
| 49 |
| 50 #endif // CHROME_BROWSER_PLUGINS_CHROME_CONTENT_BROWSER_CLIENT_PLUGINS_PART_H_ |
OLD | NEW |