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

Side by Side Diff: chrome/browser/plugins/chrome_content_browser_client_plugins_part.cc

Issue 831813004: Get nacl building again for android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make GN build rule the same as gyp Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h" 5 #include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/plugins/plugin_info_message_filter.h" 8 #include "chrome/browser/plugins/plugin_info_message_filter.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h" 10 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 return false; 59 return false;
60 #endif 60 #endif
61 } 61 }
62 62
63 bool ChromeContentBrowserClientPluginsPart::AllowPepperSocketAPI( 63 bool ChromeContentBrowserClientPluginsPart::AllowPepperSocketAPI(
64 content::BrowserContext* browser_context, 64 content::BrowserContext* browser_context,
65 const GURL& url, 65 const GURL& url,
66 bool private_api, 66 bool private_api,
67 const content::SocketPermissionRequest* params, 67 const content::SocketPermissionRequest* params,
68 const std::set<std::string>& allowed_socket_origin) { 68 const std::set<std::string>& allowed_socket_origin) {
69 #if defined(ENABLE_EXTENSIONS)
69 Profile* profile = Profile::FromBrowserContext(browser_context); 70 Profile* profile = Profile::FromBrowserContext(browser_context);
70 #if defined(ENABLE_EXTENSIONS)
71 const extensions::ExtensionSet* extension_set = NULL; 71 const extensions::ExtensionSet* extension_set = NULL;
72 if (profile) { 72 if (profile) {
73 extension_set = 73 extension_set =
74 &extensions::ExtensionRegistry::Get(profile)->enabled_extensions(); 74 &extensions::ExtensionRegistry::Get(profile)->enabled_extensions();
75 } 75 }
76 76
77 if (private_api) { 77 if (private_api) {
78 // Access to private socket APIs is controlled by the whitelist. 78 // Access to private socket APIs is controlled by the whitelist.
79 if (chrome::IsExtensionOrSharedModuleWhitelisted(url, extension_set, 79 if (chrome::IsExtensionOrSharedModuleWhitelisted(url, extension_set,
80 allowed_socket_origin)) { 80 allowed_socket_origin)) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 145
146 void ChromeContentBrowserClientPluginsPart::DidCreatePpapiPlugin( 146 void ChromeContentBrowserClientPluginsPart::DidCreatePpapiPlugin(
147 content::BrowserPpapiHost* browser_host) { 147 content::BrowserPpapiHost* browser_host) {
148 browser_host->GetPpapiHost()->AddHostFactoryFilter( 148 browser_host->GetPpapiHost()->AddHostFactoryFilter(
149 scoped_ptr<ppapi::host::HostFactory>( 149 scoped_ptr<ppapi::host::HostFactory>(
150 new chrome::ChromeBrowserPepperHostFactory(browser_host))); 150 new chrome::ChromeBrowserPepperHostFactory(browser_host)));
151 } 151 }
152 152
153 } // namespace plugins 153 } // namespace plugins
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698