OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/renderer/chrome_content_renderer_client.h" | 5 #include "chrome/renderer/chrome_content_renderer_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 #if defined(ENABLE_PLUGINS) | 1209 #if defined(ENABLE_PLUGINS) |
1210 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); | 1210 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); |
1211 #endif | 1211 #endif |
1212 } | 1212 } |
1213 | 1213 |
1214 bool ChromeContentRendererClient::IsPluginAllowedToCallRequestOSFileHandle( | 1214 bool ChromeContentRendererClient::IsPluginAllowedToCallRequestOSFileHandle( |
1215 WebKit::WebPluginContainer* container) const { | 1215 WebKit::WebPluginContainer* container) const { |
1216 #if defined(ENABLE_PLUGINS) | 1216 #if defined(ENABLE_PLUGINS) |
1217 if (!container) | 1217 if (!container) |
1218 return false; | 1218 return false; |
1219 return IsExtensionOrSharedModuleWhitelisted( | 1219 GURL url = container->element().document().baseURL(); |
1220 container->element().document().baseURL(), | 1220 const ExtensionSet* extension_set = extension_dispatcher_->extensions(); |
1221 extension_dispatcher_->extensions(), | 1221 |
1222 allowed_file_handle_origins_, | 1222 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
1223 switches::kAllowNaClFileHandleAPI); | 1223 allowed_file_handle_origins_) || |
| 1224 IsHostAllowedByCommandLine(url, extension_set, |
| 1225 switches::kAllowNaClFileHandleAPI); |
1224 #else | 1226 #else |
1225 return false; | 1227 return false; |
1226 #endif | 1228 #endif |
1227 } | 1229 } |
1228 | 1230 |
1229 WebKit::WebSpeechSynthesizer* | 1231 WebKit::WebSpeechSynthesizer* |
1230 ChromeContentRendererClient::OverrideSpeechSynthesizer( | 1232 ChromeContentRendererClient::OverrideSpeechSynthesizer( |
1231 WebKit::WebSpeechSynthesizerClient* client) { | 1233 WebKit::WebSpeechSynthesizerClient* client) { |
1232 return new TtsDispatcher(client); | 1234 return new TtsDispatcher(client); |
1233 } | 1235 } |
(...skipping 18 matching lines...) Expand all Loading... |
1252 | 1254 |
1253 if (container->element().shadowHost().isNull()) | 1255 if (container->element().shadowHost().isNull()) |
1254 return false; | 1256 return false; |
1255 | 1257 |
1256 WebString tag_name = container->element().shadowHost().tagName(); | 1258 WebString tag_name = container->element().shadowHost().tagName(); |
1257 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) || | 1259 return tag_name.equals(WebString::fromUTF8(kWebViewTagName)) || |
1258 tag_name.equals(WebString::fromUTF8(kAdViewTagName)); | 1260 tag_name.equals(WebString::fromUTF8(kAdViewTagName)); |
1259 } | 1261 } |
1260 | 1262 |
1261 } // namespace chrome | 1263 } // namespace chrome |
OLD | NEW |