Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5877)

Unified Diff: chrome/browser/plugins/chrome_content_browser_client_plugins_part.h

Issue 591063003: Split ChromeContentBrowserClient into smaller parts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/plugins/chrome_content_browser_client_plugins_part.h
diff --git a/chrome/browser/plugins/chrome_content_browser_client_plugins_part.h b/chrome/browser/plugins/chrome_content_browser_client_plugins_part.h
new file mode 100644
index 0000000000000000000000000000000000000000..e0ec82642b35c990dd7e486838c224e47dea2f79
--- /dev/null
+++ b/chrome/browser/plugins/chrome_content_browser_client_plugins_part.h
@@ -0,0 +1,50 @@
+// Copyright (c) 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_PLUGINS_CHROME_CONTENT_BROWSER_CLIENT_PLUGINS_PART_H_
+#define CHROME_BROWSER_PLUGINS_CHROME_CONTENT_BROWSER_CLIENT_PLUGINS_PART_H_
+
+#include "chrome/browser/chrome_content_browser_client_parts.h"
+#include "content/public/common/socket_permission_request.h"
+
+namespace plugins {
+
+// Implements the extensions portion of ChromeContentBrowserClient.
+class ChromeContentBrowserClientPluginsPart {
+ public:
+ ChromeContentBrowserClientPluginsPart();
+ virtual ~ChromeContentBrowserClientPluginsPart();
+
+ public:
+ bool IsPluginAllowedToUseDevChannelAPIs(
+ content::BrowserContext* browser_context,
+ const GURL& url);
+
+ bool AllowPepperSocketAPI(content::BrowserContext* browser_context,
+ const GURL& url,
+ bool private_api,
+ const content::SocketPermissionRequest* params);
+
+ bool IsPluginAllowedToCallRequestOSFileHandle(
+ content::BrowserContext* browser_context,
+ const GURL& url);
+
+ // ChromeContentBrowserClientParts:
+ void RenderProcessWillLaunch(content::RenderProcessHost* host);
+
+ private:
+ // Set of origins that can use TCP/UDP private APIs from NaCl.
+ std::set<std::string> allowed_socket_origins_;
+ // Set of origins that can get a handle for FileIO from NaCl.
+ std::set<std::string> allowed_file_handle_origins_;
+ // Set of origins that can use "dev chanel" APIs from NaCl, even on stable
+ // versions of Chrome.
+ std::set<std::string> allowed_dev_channel_origins_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChromeContentBrowserClientPluginsPart);
+};
+
+} // namespace plugins
+
+#endif // CHROME_BROWSER_PLUGINS_CHROME_CONTENT_BROWSER_CLIENT_PLUGINS_PART_H_

Powered by Google App Engine
This is Rietveld 408576698