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 "content/browser/plugin_service_impl.h" | 5 #include "content/browser/plugin_service_impl.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 RegisterPepperPlugins(); | 172 RegisterPepperPlugins(); |
173 | 173 |
174 // The --site-per-process flag enables an out-of-process iframes | 174 // The --site-per-process flag enables an out-of-process iframes |
175 // prototype, which uses WebView for rendering. We need to register the MIME | 175 // prototype, which uses WebView for rendering. We need to register the MIME |
176 // type we use with the plugin, so the renderer can instantiate it. | 176 // type we use with the plugin, so the renderer can instantiate it. |
177 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 177 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
178 if (command_line->HasSwitch(switches::kSitePerProcess)) { | 178 if (command_line->HasSwitch(switches::kSitePerProcess)) { |
179 webkit::WebPluginInfo webview_plugin( | 179 webkit::WebPluginInfo webview_plugin( |
180 ASCIIToUTF16("WebView Tag"), | 180 ASCIIToUTF16("WebView Tag"), |
181 base::FilePath(FILE_PATH_LITERAL("")), | 181 base::FilePath(), |
182 ASCIIToUTF16("1.2.3.4"), | 182 ASCIIToUTF16("1.2.3.4"), |
183 ASCIIToUTF16("Browser Plugin.")); | 183 ASCIIToUTF16("Browser Plugin.")); |
184 webview_plugin.type = webkit::WebPluginInfo::PLUGIN_TYPE_NPAPI; | 184 webview_plugin.type = webkit::WebPluginInfo::PLUGIN_TYPE_NPAPI; |
185 webkit::WebPluginMimeType webview_plugin_mime_type; | 185 webkit::WebPluginMimeType webview_plugin_mime_type; |
186 webview_plugin_mime_type.mime_type = "application/browser-plugin"; | 186 webview_plugin_mime_type.mime_type = "application/browser-plugin"; |
187 webview_plugin_mime_type.file_extensions.push_back("*"); | 187 webview_plugin_mime_type.file_extensions.push_back("*"); |
188 webview_plugin.mime_types.push_back(webview_plugin_mime_type); | 188 webview_plugin.mime_types.push_back(webview_plugin_mime_type); |
189 RegisterInternalPlugin(webview_plugin, true); | 189 RegisterInternalPlugin(webview_plugin, true); |
190 } | 190 } |
191 | 191 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
790 void PluginServiceImpl::GetInternalPlugins( | 790 void PluginServiceImpl::GetInternalPlugins( |
791 std::vector<webkit::WebPluginInfo>* plugins) { | 791 std::vector<webkit::WebPluginInfo>* plugins) { |
792 plugin_list_->GetInternalPlugins(plugins); | 792 plugin_list_->GetInternalPlugins(plugins); |
793 } | 793 } |
794 | 794 |
795 webkit::npapi::PluginList* PluginServiceImpl::GetPluginList() { | 795 webkit::npapi::PluginList* PluginServiceImpl::GetPluginList() { |
796 return plugin_list_; | 796 return plugin_list_; |
797 } | 797 } |
798 | 798 |
799 } // namespace content | 799 } // namespace content |
OLD | NEW |