diff options
56 files changed, 256 insertions, 255 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 354a560..ff6b7de 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -3401,10 +3401,10 @@ void TestingAutomationProvider::GetPluginsInfo( this, browser, args, reply_message)); return; } - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; webkit::npapi::PluginList::Singleton()->GetPlugins(&plugins); ListValue* items = new ListValue; - for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it = + for (std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin(); it != plugins.end(); ++it) { @@ -3413,10 +3413,10 @@ void TestingAutomationProvider::GetPluginsInfo( item->SetString("path", it->path.value()); item->SetString("version", it->version); item->SetString("desc", it->desc); - item->SetBoolean("enabled", webkit::npapi::IsPluginEnabled(*it)); + item->SetBoolean("enabled", webkit::IsPluginEnabled(*it)); // Add info about mime types. ListValue* mime_types = new ListValue(); - for (std::vector<webkit::npapi::WebPluginMimeType>::const_iterator type_it = + for (std::vector<webkit::WebPluginMimeType>::const_iterator type_it = it->mime_types.begin(); type_it != it->mime_types.end(); ++type_it) { diff --git a/chrome/browser/browser_about_handler.cc b/chrome/browser/browser_about_handler.cc index 9745341..ea28611 100644 --- a/chrome/browser/browser_about_handler.cc +++ b/chrome/browser/browser_about_handler.cc @@ -60,7 +60,7 @@ #include "ui/base/resource/resource_bundle.h" #include "webkit/glue/webkit_glue.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #ifdef CHROME_V8 #include "v8/include/v8.h" @@ -1108,13 +1108,13 @@ std::string AboutVersionStrings(DictionaryValue* localized_strings, localized_strings->SetString("js_version", js_version); // Obtain the version of the first enabled Flash plugin. - std::vector<webkit::npapi::WebPluginInfo> info_array; + std::vector<webkit::WebPluginInfo> info_array; webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( GURL(), "application/x-shockwave-flash", false, NULL, &info_array, NULL); string16 flash_version = l10n_util::GetStringUTF16(IDS_PLUGINS_DISABLED_PLUGIN); for (size_t i = 0; i < info_array.size(); ++i) { - if (webkit::npapi::IsPluginEnabled(info_array[i])) { + if (webkit::IsPluginEnabled(info_array[i])) { flash_version = info_array[i].version; break; } diff --git a/chrome/browser/chromeos/gview_request_interceptor.cc b/chrome/browser/chromeos/gview_request_interceptor.cc index bfa5eae..3beab22 100644 --- a/chrome/browser/chromeos/gview_request_interceptor.cc +++ b/chrome/browser/chromeos/gview_request_interceptor.cc @@ -65,11 +65,11 @@ net::URLRequestJob* GViewRequestInterceptor::MaybeInterceptResponse( // redirect PDF files to Google Document Viewer. if (mime_type == kPdfMimeType) { FilePath pdf_path; - webkit::npapi::WebPluginInfo info; + webkit::WebPluginInfo info; PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path); if (webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath( pdf_path, &info) && - webkit::npapi::IsPluginEnabled(info)) + webkit::IsPluginEnabled(info)) return NULL; } // If supported, build the URL to the Google Document Viewer diff --git a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc index 5e573fe..4e4d204 100644 --- a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc +++ b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc @@ -72,9 +72,9 @@ class GViewRequestInterceptorTest : public testing::Test { } void RegisterPDFPlugin() { - webkit::npapi::WebPluginInfo info; + webkit::WebPluginInfo info; info.path = pdf_path_; - info.enabled = webkit::npapi::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; + info.enabled = webkit::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info); webkit::npapi::PluginList::Singleton()->RefreshPlugins(); } @@ -85,7 +85,7 @@ class GViewRequestInterceptorTest : public testing::Test { } void SetPDFPluginLoadedState(bool want_loaded, bool* out_is_enabled) { - webkit::npapi::WebPluginInfo info; + webkit::WebPluginInfo info; bool is_loaded = webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath( pdf_path_, &info); @@ -102,7 +102,7 @@ class GViewRequestInterceptorTest : public testing::Test { pdf_path_, &info); } EXPECT_EQ(want_loaded, is_loaded); - *out_is_enabled = webkit::npapi::IsPluginEnabled(info); + *out_is_enabled = webkit::IsPluginEnabled(info); } protected: diff --git a/chrome/browser/extensions/extension_content_settings_apitest.cc b/chrome/browser/extensions/extension_content_settings_apitest.cc index 11411df..ee3b2cc 100644 --- a/chrome/browser/extensions/extension_content_settings_apitest.cc +++ b/chrome/browser/extensions/extension_content_settings_apitest.cc @@ -206,15 +206,15 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, webkit::npapi::MockPluginList plugin_list(kPluginDefinitions, arraysize(kPluginDefinitions)); plugin_list.AddPluginToLoad( - webkit::npapi::WebPluginInfo(ASCIIToUTF16(kFooName), - FilePath(kFooPath), - ASCIIToUTF16("1.2.3"), - ASCIIToUTF16("foo"))); + webkit::WebPluginInfo(ASCIIToUTF16(kFooName), + FilePath(kFooPath), + ASCIIToUTF16("1.2.3"), + ASCIIToUTF16("foo"))); plugin_list.AddPluginToLoad( - webkit::npapi::WebPluginInfo(ASCIIToUTF16(kBarName), - FilePath(kBarPath), - ASCIIToUTF16("2.3.4"), - ASCIIToUTF16("bar"))); + webkit::WebPluginInfo(ASCIIToUTF16(kBarName), + FilePath(kBarPath), + ASCIIToUTF16("2.3.4"), + ASCIIToUTF16("bar"))); GetResourceIdentifiersFunction::SetPluginListForTesting(&plugin_list); EXPECT_TRUE(RunExtensionTest("content_settings/getresourceidentifiers")) diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc index c55a7f6..4f393d0 100644 --- a/chrome/browser/extensions/extension_service.cc +++ b/chrome/browser/extensions/extension_service.cc @@ -2561,7 +2561,7 @@ void ExtensionService::UpdatePluginListWithNaClModules() { for (size_t i = 0; i < plugins.size(); ++i) { pepper_info = &plugins[i]; CHECK(pepper_info); - std::vector<webkit::npapi::WebPluginMimeType>::const_iterator mime_iter; + std::vector<webkit::WebPluginMimeType>::const_iterator mime_iter; // Check each MIME type the plugins handle for the NaCl MIME type. for (mime_iter = pepper_info->mime_types.begin(); mime_iter != pepper_info->mime_types.end(); ++mime_iter) { @@ -2571,7 +2571,7 @@ void ExtensionService::UpdatePluginListWithNaClModules() { webkit::npapi::PluginList::Singleton()-> UnregisterInternalPlugin(pepper_info->path); - webkit::npapi::WebPluginInfo info = pepper_info->ToWebPluginInfo(); + webkit::WebPluginInfo info = pepper_info->ToWebPluginInfo(); for (ExtensionService::NaClModuleInfoList::const_iterator iter = nacl_module_list_.begin(); @@ -2579,7 +2579,7 @@ void ExtensionService::UpdatePluginListWithNaClModules() { // Add the MIME type specified in the extension to this NaCl plugin, // With an extra "nacl" argument to specify the location of the NaCl // manifest file. - webkit::npapi::WebPluginMimeType mime_type_info; + webkit::WebPluginMimeType mime_type_info; mime_type_info.mime_type = iter->mime_type; mime_type_info.additional_param_names.push_back(UTF8ToUTF16("nacl")); mime_type_info.additional_param_values.push_back( diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc index c826923..ce82634 100644 --- a/chrome/browser/metrics/metrics_log.cc +++ b/chrome/browser/metrics/metrics_log.cc @@ -26,7 +26,7 @@ #include "chrome/common/pref_names.h" #include "content/browser/gpu/gpu_data_manager.h" #include "googleurl/src/gurl.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name) @@ -270,12 +270,12 @@ void MetricsLog::WriteRealtimeStabilityAttributes(PrefService* pref) { } void MetricsLog::WritePluginList( - const std::vector<webkit::npapi::WebPluginInfo>& plugin_list) { + const std::vector<webkit::WebPluginInfo>& plugin_list) { DCHECK(!locked_); OPEN_ELEMENT_FOR_SCOPE("plugins"); - for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator iter = + for (std::vector<webkit::WebPluginInfo>::const_iterator iter = plugin_list.begin(); iter != plugin_list.end(); ++iter) { OPEN_ELEMENT_FOR_SCOPE("plugin"); @@ -291,7 +291,7 @@ void MetricsLog::WritePluginList( #endif WriteAttribute("filename", CreateBase64Hash(filename_bytes)); WriteAttribute("version", UTF16ToUTF8(iter->version)); - WriteIntAttribute("disabled", !webkit::npapi::IsPluginEnabled(*iter)); + WriteIntAttribute("disabled", !webkit::IsPluginEnabled(*iter)); } } @@ -302,7 +302,7 @@ void MetricsLog::WriteInstallElement() { } void MetricsLog::RecordEnvironment( - const std::vector<webkit::npapi::WebPluginInfo>& plugin_list, + const std::vector<webkit::WebPluginInfo>& plugin_list, const DictionaryValue* profile_metrics) { DCHECK(!locked_); diff --git a/chrome/browser/metrics/metrics_log.h b/chrome/browser/metrics/metrics_log.h index 36f2ec5..fbab92e 100644 --- a/chrome/browser/metrics/metrics_log.h +++ b/chrome/browser/metrics/metrics_log.h @@ -22,10 +22,8 @@ class DictionaryValue; } namespace webkit { -namespace npapi { struct WebPluginInfo; } -} class MetricsLog : public MetricsLogBase { public: @@ -44,7 +42,7 @@ class MetricsLog : public MetricsLogBase { // that are to be recorded. Each value in profile_metrics should be a // dictionary giving the metrics for the profile. void RecordEnvironment( - const std::vector<webkit::npapi::WebPluginInfo>& plugin_list, + const std::vector<webkit::WebPluginInfo>& plugin_list, const base::DictionaryValue* profile_metrics); // Records the input text, available choices, and selected entry when the @@ -92,7 +90,7 @@ class MetricsLog : public MetricsLogBase { // Writes the list of installed plugins. void WritePluginList( - const std::vector<webkit::npapi::WebPluginInfo>& plugin_list); + const std::vector<webkit::WebPluginInfo>& plugin_list); // Within the profile group, write basic install info including appversion. void WriteInstallElement(); diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index 281905b..aec969f 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -191,7 +191,7 @@ #include "content/common/child_process_info.h" #include "content/common/notification_service.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" // TODO(port): port browser_distribution.h. #if !defined(OS_POSIX) @@ -321,7 +321,7 @@ class MetricsService::InitTaskComplete : public Task { public: explicit InitTaskComplete( const std::string& hardware_class, - const std::vector<webkit::npapi::WebPluginInfo>& plugins) + const std::vector<webkit::WebPluginInfo>& plugins) : hardware_class_(hardware_class), plugins_(plugins) {} virtual void Run() { @@ -331,7 +331,7 @@ class MetricsService::InitTaskComplete : public Task { private: std::string hardware_class_; - std::vector<webkit::npapi::WebPluginInfo> plugins_; + std::vector<webkit::WebPluginInfo> plugins_; }; class MetricsService::InitTask : public Task { @@ -340,7 +340,7 @@ class MetricsService::InitTask : public Task { : callback_loop_(callback_loop) {} virtual void Run() { - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; webkit::npapi::PluginList::Singleton()->GetPlugins(&plugins); std::string hardware_class; // Empty string by default. #if defined(OS_CHROMEOS) @@ -794,7 +794,7 @@ void MetricsService::InitializeMetricsState() { void MetricsService::OnInitTaskComplete( const std::string& hardware_class, - const std::vector<webkit::npapi::WebPluginInfo>& plugins) { + const std::vector<webkit::WebPluginInfo>& plugins) { DCHECK(state_ == INIT_TASK_SCHEDULED); hardware_class_ = hardware_class; plugins_ = plugins; diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h index 8d38f99..8e477a6 100644 --- a/chrome/browser/metrics/metrics_service.h +++ b/chrome/browser/metrics/metrics_service.h @@ -40,11 +40,8 @@ class ListValue; } namespace webkit { -namespace npapi { struct WebPluginInfo; } -} - class MetricsService : public NotificationObserver, public URLFetcher::Delegate, @@ -156,7 +153,7 @@ class MetricsService : public NotificationObserver, // Callback to let us know that the init task is done. void OnInitTaskComplete( const std::string& hardware_class, - const std::vector<webkit::npapi::WebPluginInfo>& plugins); + const std::vector<webkit::WebPluginInfo>& plugins); // When we start a new version of Chromium (different from our last run), we // need to discard the old crash stats so that we don't attribute crashes etc. @@ -356,7 +353,7 @@ class MetricsService : public NotificationObserver, std::string hardware_class_; // The list of plugins which was retrieved on the file thread. - std::vector<webkit::npapi::WebPluginInfo> plugins_; + std::vector<webkit::WebPluginInfo> plugins_; // The outstanding transmission appears as a URL Fetch operation. scoped_ptr<URLFetcher> current_fetch_; diff --git a/chrome/browser/pdf_unsupported_feature.cc b/chrome/browser/pdf_unsupported_feature.cc index 172f4fb..9190ffc 100644 --- a/chrome/browser/pdf_unsupported_feature.cc +++ b/chrome/browser/pdf_unsupported_feature.cc @@ -27,11 +27,11 @@ #include "ui/base/resource/resource_bundle.h" #include "webkit/plugins/npapi/plugin_group.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" using webkit::npapi::PluginGroup; using webkit::npapi::PluginList; -using webkit::npapi::WebPluginInfo; +using webkit::WebPluginInfo; namespace { diff --git a/chrome/browser/plugin_data_remover.cc b/chrome/browser/plugin_data_remover.cc index e17254e..2046a79 100644 --- a/chrome/browser/plugin_data_remover.cc +++ b/chrome/browser/plugin_data_remover.cc @@ -87,7 +87,7 @@ bool PluginDataRemover::OffTheRecord() { } void PluginDataRemover::SetPluginInfo( - const webkit::npapi::WebPluginInfo& info) { + const webkit::WebPluginInfo& info) { } void PluginDataRemover::OnChannelOpened(const IPC::ChannelHandle& handle) { @@ -168,10 +168,10 @@ void PluginDataRemover::SignalDone() { bool PluginDataRemover::IsSupported() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); bool allow_wildcard = false; - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( GURL(), kFlashMimeType, allow_wildcard, NULL, &plugins, NULL); - std::vector<webkit::npapi::WebPluginInfo>::iterator plugin = plugins.begin(); + std::vector<webkit::WebPluginInfo>::iterator plugin = plugins.begin(); if (plugin == plugins.end()) return false; scoped_ptr<Version> version( @@ -181,7 +181,7 @@ bool PluginDataRemover::IsSupported() { switches::kMinClearSiteDataFlashVersion))); if (!min_version.get()) min_version.reset(Version::GetVersionFromString(kMinFlashVersion)); - return webkit::npapi::IsPluginEnabled(*plugin) && + return webkit::IsPluginEnabled(*plugin) && version.get() && min_version->CompareTo(*version) == -1; } diff --git a/chrome/browser/plugin_data_remover.h b/chrome/browser/plugin_data_remover.h index c455704..fa7d331 100644 --- a/chrome/browser/plugin_data_remover.h +++ b/chrome/browser/plugin_data_remover.h @@ -47,7 +47,7 @@ class PluginDataRemover : public base::RefCountedThreadSafe<PluginDataRemover>, // PluginProcessHost::Client methods. virtual int ID(); virtual bool OffTheRecord(); - virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info); + virtual void SetPluginInfo(const webkit::WebPluginInfo& info); virtual void OnChannelOpened(const IPC::ChannelHandle& handle); virtual void OnError(); diff --git a/chrome/browser/plugin_exceptions_table_model.h b/chrome/browser/plugin_exceptions_table_model.h index 77fbee8..9f37621 100644 --- a/chrome/browser/plugin_exceptions_table_model.h +++ b/chrome/browser/plugin_exceptions_table_model.h @@ -15,8 +15,6 @@ #include "content/common/notification_observer.h" #include "webkit/plugins/npapi/plugin_list.h" -struct WebPluginInfo; - class PluginExceptionsTableModel : public RemoveRowsTableModel, public NotificationObserver { public: diff --git a/chrome/browser/plugin_exceptions_table_model_unittest.cc b/chrome/browser/plugin_exceptions_table_model_unittest.cc index 47c3bfc..3163b04 100644 --- a/chrome/browser/plugin_exceptions_table_model_unittest.cc +++ b/chrome/browser/plugin_exceptions_table_model_unittest.cc @@ -14,7 +14,7 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/models/table_model_observer.h" #include "webkit/plugins/npapi/plugin_group.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" // Can't be an internal namespace because PluginExceptionsTableModel declares // as a friend. @@ -91,20 +91,20 @@ class PluginExceptionsTableModelTest : public TestingBrowserProcessTest { table_model_.reset(new MockPluginExceptionsTableModel(map, NULL)); std::vector<webkit::npapi::PluginGroup> plugins; - webkit::npapi::WebPluginInfo foo_plugin; + webkit::WebPluginInfo foo_plugin; foo_plugin.path = FilePath(FILE_PATH_LITERAL("a-foo")); foo_plugin.name = ASCIIToUTF16("FooPlugin"); foo_plugin.enabled = - webkit::npapi::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; + webkit::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; scoped_ptr<webkit::npapi::PluginGroup> foo_group( webkit::npapi::PluginGroup::FromWebPluginInfo(foo_plugin)); plugins.push_back(*foo_group); - webkit::npapi::WebPluginInfo bar_plugin; + webkit::WebPluginInfo bar_plugin; bar_plugin.path = FilePath(FILE_PATH_LITERAL("b-bar")); bar_plugin.name = ASCIIToUTF16("BarPlugin"); bar_plugin.enabled = - webkit::npapi::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; + webkit::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; scoped_ptr<webkit::npapi::PluginGroup> bar_group( webkit::npapi::PluginGroup::FromWebPluginInfo(bar_plugin)); plugins.push_back(*bar_group); diff --git a/chrome/browser/plugin_observer.cc b/chrome/browser/plugin_observer.cc index ce0c849..0519d8a 100644 --- a/chrome/browser/plugin_observer.cc +++ b/chrome/browser/plugin_observer.cc @@ -24,7 +24,7 @@ #include "webkit/plugins/npapi/default_plugin_shared.h" #include "webkit/plugins/npapi/plugin_group.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" namespace { @@ -335,7 +335,7 @@ void PluginObserver::OnCrashedPlugin(const FilePath& plugin_path) { DCHECK(!plugin_path.value().empty()); string16 plugin_name = plugin_path.LossyDisplayName(); - webkit::npapi::WebPluginInfo plugin_info; + webkit::WebPluginInfo plugin_info; if (webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath( plugin_path, &plugin_info) && !plugin_info.name.empty()) { diff --git a/chrome/browser/plugin_updater.cc b/chrome/browser/plugin_updater.cc index 887fba8..0fa0420b 100644 --- a/chrome/browser/plugin_updater.cc +++ b/chrome/browser/plugin_updater.cc @@ -22,7 +22,7 @@ #include "content/browser/browser_thread.h" #include "content/common/notification_service.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" // How long to wait to save the plugin enabled information, which might need to // go to disk. @@ -33,12 +33,12 @@ PluginUpdater::PluginUpdater() } DictionaryValue* PluginUpdater::CreatePluginFileSummary( - const webkit::npapi::WebPluginInfo& plugin) { + const webkit::WebPluginInfo& plugin) { DictionaryValue* data = new DictionaryValue(); data->SetString("path", plugin.path.value()); data->SetString("name", plugin.name); data->SetString("version", plugin.version); - data->SetBoolean("enabled", webkit::npapi::IsPluginEnabled(plugin)); + data->SetBoolean("enabled", webkit::IsPluginEnabled(plugin)); return data; } @@ -263,7 +263,7 @@ void PluginUpdater::UpdatePreferences(Profile* profile, int delay_ms) { } void PluginUpdater::GetPreferencesDataOnFileThread(void* profile) { - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; webkit::npapi::PluginList::Singleton()->GetPlugins(&plugins); std::vector<webkit::npapi::PluginGroup> groups; @@ -279,7 +279,7 @@ void PluginUpdater::GetPreferencesDataOnFileThread(void* profile) { void PluginUpdater::OnUpdatePreferences( Profile* profile, - const std::vector<webkit::npapi::WebPluginInfo>& plugins, + const std::vector<webkit::WebPluginInfo>& plugins, const std::vector<webkit::npapi::PluginGroup>& groups) { ListPrefUpdate update(profile->GetPrefs(), prefs::kPluginsPluginsList); ListValue* plugins_list = update.Get(); @@ -295,10 +295,10 @@ void PluginUpdater::OnUpdatePreferences( DictionaryValue* summary = CreatePluginFileSummary(plugins[i]); // If the plugin is managed by policy, store the user preferred state // instead. - if (plugins[i].enabled & webkit::npapi::WebPluginInfo::MANAGED_MASK) { + if (plugins[i].enabled & webkit::WebPluginInfo::MANAGED_MASK) { bool user_enabled = - (plugins[i].enabled & webkit::npapi::WebPluginInfo::USER_MASK) == - webkit::npapi::WebPluginInfo::USER_ENABLED; + (plugins[i].enabled & webkit::WebPluginInfo::USER_MASK) == + webkit::WebPluginInfo::USER_ENABLED; summary->SetBoolean("enabled", user_enabled); } plugins_list->Append(summary); diff --git a/chrome/browser/plugin_updater.h b/chrome/browser/plugin_updater.h index dc9cfaf..cbc885d 100644 --- a/chrome/browser/plugin_updater.h +++ b/chrome/browser/plugin_updater.h @@ -25,9 +25,9 @@ class ListValue; } namespace webkit { +struct WebPluginInfo; namespace npapi { class PluginGroup; -struct WebPluginInfo; } } @@ -73,7 +73,7 @@ class PluginUpdater : public NotificationObserver { // Called on the UI thread with the plugin data to save the preferences. static void OnUpdatePreferences( Profile* profile, - const std::vector<webkit::npapi::WebPluginInfo>& plugins, + const std::vector<webkit::WebPluginInfo>& plugins, const std::vector<webkit::npapi::PluginGroup>& groups); // Queues sending the notification that plugin data has changed. This is done @@ -84,7 +84,7 @@ class PluginUpdater : public NotificationObserver { static void OnNotifyPluginStatusChanged(); static base::DictionaryValue* CreatePluginFileSummary( - const webkit::npapi::WebPluginInfo& plugin); + const webkit::WebPluginInfo& plugin); // Force plugins to be enabled or disabled due to policy. // |disabled_list| contains the list of StringValues of the names of the diff --git a/chrome/browser/ui/cocoa/drag_util.mm b/chrome/browser/ui/cocoa/drag_util.mm index 88c746b..1e059c8 100644 --- a/chrome/browser/ui/cocoa/drag_util.mm +++ b/chrome/browser/ui/cocoa/drag_util.mm @@ -82,11 +82,11 @@ static BOOL IsSupportedFileURL(const GURL& url) { // TODO(bauerb): This possibly uses stale information, but it's guaranteed not // to do disk access. bool stale = false; - std::vector<webkit::npapi::WebPluginInfo> info_array; + std::vector<webkit::WebPluginInfo> info_array; webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( url, mime_type, false, &stale, &info_array, NULL); for (size_t i = 0; i < info_array.size(); ++i) { - if (webkit::npapi::IsPluginEnabled(info_array[i])) + if (webkit::IsPluginEnabled(info_array[i])) return true; } diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc index 188bf73..a8a2793 100644 --- a/chrome/browser/ui/webui/flash_ui.cc +++ b/chrome/browser/ui/webui/flash_ui.cc @@ -27,7 +27,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #if defined(OS_WIN) #include "base/win/windows_version.h" @@ -221,7 +221,7 @@ void FlashDOMHandler::MaybeRespondToPage() { AddPair(list, l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_OS), os_label); // Obtain the version of the Flash plugins. - std::vector<webkit::npapi::WebPluginInfo> info_array; + std::vector<webkit::WebPluginInfo> info_array; webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( GURL(), "application/x-shockwave-flash", false, NULL, &info_array, NULL); string16 flash_version; @@ -229,7 +229,7 @@ void FlashDOMHandler::MaybeRespondToPage() { AddPair(list, ASCIIToUTF16("Flash plugin"), "Disabled"); } else { for (size_t i = 0; i < info_array.size(); ++i) { - if (webkit::npapi::IsPluginEnabled(info_array[i])) { + if (webkit::IsPluginEnabled(info_array[i])) { flash_version = info_array[i].version + ASCIIToUTF16(" ") + info_array[i].path.LossyDisplayName(); if (i != 0) diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc index 1adc397..c355815 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc @@ -85,10 +85,10 @@ void ComputeBuiltInPlugins(std::vector<PepperPluginInfo>* plugins) { PepperPluginInfo pdf; pdf.path = path; pdf.name = kPDFPluginName; - webkit::npapi::WebPluginMimeType pdf_mime_type(kPDFPluginMimeType, - kPDFPluginExtension, - kPDFPluginDescription); - webkit::npapi::WebPluginMimeType print_preview_pdf_mime_type( + webkit::WebPluginMimeType pdf_mime_type(kPDFPluginMimeType, + kPDFPluginExtension, + kPDFPluginDescription); + webkit::WebPluginMimeType print_preview_pdf_mime_type( kPDFPluginPrintPreviewMimeType, kPDFPluginExtension, kPDFPluginDescription); @@ -110,9 +110,9 @@ void ComputeBuiltInPlugins(std::vector<PepperPluginInfo>* plugins) { PepperPluginInfo nacl; nacl.path = path; nacl.name = kNaClPluginName; - webkit::npapi::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType, - kNaClPluginExtension, - kNaClPluginDescription); + webkit::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType, + kNaClPluginExtension, + kNaClPluginDescription); nacl.mime_types.push_back(nacl_mime_type); plugins->push_back(nacl); @@ -126,12 +126,12 @@ void ComputeBuiltInPlugins(std::vector<PepperPluginInfo>* plugins) { info.is_internal = true; info.name = kRemotingViewerPluginName; info.path = FilePath(kRemotingViewerPluginPath); - webkit::npapi::WebPluginMimeType remoting_mime_type( + webkit::WebPluginMimeType remoting_mime_type( kRemotingViewerPluginMimeType, std::string(), std::string()); info.mime_types.push_back(remoting_mime_type); - webkit::npapi::WebPluginMimeType old_remoting_mime_type( + webkit::WebPluginMimeType old_remoting_mime_type( kRemotingViewerPluginOldMimeType, std::string(), std::string()); @@ -183,13 +183,13 @@ void AddOutOfProcessFlash(std::vector<PepperPluginInfo>* plugins) { plugin.description = plugin.name + " " + flash_version_numbers[0] + "." + flash_version_numbers[1] + " r" + flash_version_numbers[2]; plugin.version = JoinString(flash_version_numbers, '.'); - webkit::npapi::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, - kFlashPluginSwfExtension, - kFlashPluginSwfDescription); + webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, + kFlashPluginSwfExtension, + kFlashPluginSwfDescription); plugin.mime_types.push_back(swf_mime_type); - webkit::npapi::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType, - kFlashPluginSplExtension, - kFlashPluginSplDescription); + webkit::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType, + kFlashPluginSplExtension, + kFlashPluginSplDescription); plugin.mime_types.push_back(spl_mime_type); plugins->push_back(plugin); } diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index 2a03c82..31db342 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc @@ -282,7 +282,7 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl( bool found = false; *is_default_plugin = false; CommandLine* cmd = CommandLine::ForCurrentProcess(); - webkit::npapi::WebPluginInfo info; + webkit::WebPluginInfo info; GURL url(original_params.url); std::string orig_mime_type = original_params.mimeType.utf8(); std::string actual_mime_type; @@ -292,7 +292,7 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl( if (!found) return NULL; - if (!webkit::npapi::IsPluginEnabled(info)) + if (!webkit::IsPluginEnabled(info)) return NULL; *is_default_plugin = @@ -410,7 +410,7 @@ WebPlugin* ChromeContentRendererClient::CreatePluginImpl( string16 nacl_attr = ASCIIToUTF16(kNaClPluginManifestAttribute); for (size_t i = 0; i < info.mime_types.size(); ++i) { if (info.mime_types[i].mime_type == actual_mime_type) { - const webkit::npapi::WebPluginMimeType& content_type = + const webkit::WebPluginMimeType& content_type = info.mime_types[i]; for (size_t i = 0; i < content_type.additional_param_names.size(); ++i) { diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index 863133f..6e2af29 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -152,7 +152,7 @@ PluginProcessHost::~PluginProcessHost() { CancelRequests(); } -bool PluginProcessHost::Init(const webkit::npapi::WebPluginInfo& info, +bool PluginProcessHost::Init(const webkit::WebPluginInfo& info, const std::string& locale) { info_ = info; set_name(info_.name); diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h index e337887..63ea1b5 100644 --- a/content/browser/plugin_process_host.h +++ b/content/browser/plugin_process_host.h @@ -16,7 +16,7 @@ #include "base/basictypes.h" #include "base/memory/ref_counted.h" #include "content/browser/browser_child_process_host.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #include "ui/gfx/native_widget_types.h" namespace gfx { @@ -45,7 +45,7 @@ class PluginProcessHost : public BrowserChildProcessHost { // the channel. virtual int ID() = 0; virtual bool OffTheRecord() = 0; - virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) = 0; + virtual void SetPluginInfo(const webkit::WebPluginInfo& info) = 0; // The client should delete itself when one of these methods is called. virtual void OnChannelOpened(const IPC::ChannelHandle& handle) = 0; virtual void OnError() = 0; @@ -59,7 +59,7 @@ class PluginProcessHost : public BrowserChildProcessHost { // Initialize the new plugin process, returning true on success. This must // be called before the object can be used. - bool Init(const webkit::npapi::WebPluginInfo& info, const std::string& locale); + bool Init(const webkit::WebPluginInfo& info, const std::string& locale); // Force the plugin process to shutdown (cleanly). virtual void ForceShutdown(); @@ -85,7 +85,7 @@ class PluginProcessHost : public BrowserChildProcessHost { void OnAppActivation(); #endif - const webkit::npapi::WebPluginInfo& info() const { return info_; } + const webkit::WebPluginInfo& info() const { return info_; } #if defined(OS_WIN) // Tracks plugin parent windows created on the browser UI thread. @@ -131,7 +131,7 @@ class PluginProcessHost : public BrowserChildProcessHost { std::queue<Client*> sent_requests_; // Information about the plugin. - webkit::npapi::WebPluginInfo info_; + webkit::WebPluginInfo info_; #if defined(OS_WIN) // Tracks plugin parent windows created on the UI thread. diff --git a/content/browser/plugin_service.cc b/content/browser/plugin_service.cc index 154d062..2b02c98 100644 --- a/content/browser/plugin_service.cc +++ b/content/browser/plugin_service.cc @@ -28,7 +28,7 @@ #include "content/common/view_messages.h" #include "webkit/plugins/npapi/plugin_constants_win.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #if defined(OS_POSIX) && !defined(OS_MACOSX) using ::base::files::FilePathWatcher; @@ -211,7 +211,7 @@ PluginProcessHost* PluginService::FindOrStartNpapiPluginProcess( if (plugin_host) return plugin_host; - webkit::npapi::WebPluginInfo info; + webkit::WebPluginInfo info; if (!webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath( plugin_path, &info)) { return NULL; @@ -319,7 +319,7 @@ void PluginService::GetAllowedPluginForOpenChannelToPlugin( const std::string& mime_type, PluginProcessHost::Client* client) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); - webkit::npapi::WebPluginInfo info; + webkit::WebPluginInfo info; bool found = GetPluginInfo( render_process_id, render_view_id, url, mime_type, &info, NULL); FilePath plugin_path; @@ -350,7 +350,7 @@ bool PluginService::GetPluginInfo(int render_process_id, int render_view_id, const GURL& url, const std::string& mime_type, - webkit::npapi::WebPluginInfo* info, + webkit::WebPluginInfo* info, std::string* actual_mime_type) { // GetPluginInfoArray may need to load the plugins, so we need to be // on the FILE thread. @@ -369,12 +369,12 @@ bool PluginService::GetPluginInfo(int render_process_id, } } bool allow_wildcard = true; - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; std::vector<std::string> mime_types; webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( url, mime_type, allow_wildcard, NULL, &plugins, &mime_types); for (size_t i = 0; i < plugins.size(); ++i) { - if (webkit::npapi::IsPluginEnabled(plugins[i])) { + if (webkit::IsPluginEnabled(plugins[i])) { *info = plugins[i]; if (actual_mime_type) *actual_mime_type = mime_types[i]; diff --git a/content/browser/plugin_service.h b/content/browser/plugin_service.h index 975d815..87812f9 100644 --- a/content/browser/plugin_service.h +++ b/content/browser/plugin_service.h @@ -26,7 +26,7 @@ #include "content/common/notification_registrar.h" #include "googleurl/src/gurl.h" #include "ipc/ipc_channel_handle.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #if defined(OS_WIN) #include "base/memory/scoped_ptr.h" @@ -50,7 +50,7 @@ class PluginService int render_process_id; int render_view_id; GURL url; - webkit::npapi::WebPluginInfo plugin; + webkit::WebPluginInfo plugin; }; // Returns the PluginService singleton. @@ -97,7 +97,7 @@ class PluginService int render_view_id, const GURL& url, const std::string& mime_type, - webkit::npapi::WebPluginInfo* info, + webkit::WebPluginInfo* info, std::string* actual_mime_type); // Safe to be called from any thread. diff --git a/content/browser/plugin_service_browsertest.cc b/content/browser/plugin_service_browsertest.cc index e1e15b7..188842c 100644 --- a/content/browser/plugin_service_browsertest.cc +++ b/content/browser/plugin_service_browsertest.cc @@ -44,7 +44,7 @@ class MockPluginProcessHostClient : public PluginProcessHost::Client, ASSERT_TRUE(channel_->Connect()); } - void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) { + void SetPluginInfo(const webkit::WebPluginInfo& info) { ASSERT_TRUE(info.mime_types.size()); ASSERT_EQ(kNPAPITestPluginMimeType, info.mime_types[0].mime_type); set_plugin_info_called_ = true; diff --git a/content/browser/renderer_host/buffered_resource_handler.cc b/content/browser/renderer_host/buffered_resource_handler.cc index 8626682..2810c5d 100644 --- a/content/browser/renderer_host/buffered_resource_handler.cc +++ b/content/browser/renderer_host/buffered_resource_handler.cc @@ -389,7 +389,7 @@ bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) { // Finally, check the plugin list. bool allow_wildcard = false; bool stale = false; - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( request_->url(), type, allow_wildcard, &stale, &plugins, NULL); if (need_plugin_list) { @@ -402,7 +402,7 @@ bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) { } for (size_t i = 0; i < plugins.size(); ++i) { - if (webkit::npapi::IsPluginEnabled(plugins[i])) + if (webkit::IsPluginEnabled(plugins[i])) return false; } return true; @@ -440,7 +440,7 @@ void BufferedResourceHandler::UseAlternateResourceHandler( } void BufferedResourceHandler::LoadPlugins() { - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; webkit::npapi::PluginList::Singleton()->GetPlugins(&plugins); BrowserThread::PostTask( diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index 389f30e..544456c 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -56,7 +56,7 @@ #include "webkit/plugins/npapi/plugin_group.h" #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/webplugin.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #if defined(OS_MACOSX) #include "content/common/font_descriptor_mac.h" @@ -133,7 +133,7 @@ class OpenChannelToNpapiPluginCallback : public RenderMessageCompletionCallback, return filter()->OffTheRecord(); } - virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) { + virtual void SetPluginInfo(const webkit::WebPluginInfo& info) { info_ = info; } @@ -152,7 +152,7 @@ class OpenChannelToNpapiPluginCallback : public RenderMessageCompletionCallback, SendReplyAndDeleteThis(); } - webkit::npapi::WebPluginInfo info_; + webkit::WebPluginInfo info_; }; class OpenChannelToPpapiPluginCallback : public RenderMessageCompletionCallback, @@ -518,7 +518,7 @@ void RenderMessageFilter::OnPreCacheFont(const LOGFONT& font) { void RenderMessageFilter::OnGetPlugins( bool refresh, - std::vector<webkit::npapi::WebPluginInfo>* plugins) { + std::vector<webkit::WebPluginInfo>* plugins) { // Don't refresh if the specified threshold has not been passed. Note that // this check is performed before off-loading to the file thread. The reason // we do this is that some pages tend to request that the list of plugins be @@ -536,10 +536,10 @@ void RenderMessageFilter::OnGetPlugins( } } - std::vector<webkit::npapi::WebPluginInfo> all_plugins; + std::vector<webkit::WebPluginInfo> all_plugins; webkit::npapi::PluginList::Singleton()->GetPlugins(&all_plugins); for (size_t i = 0; i < all_plugins.size(); ++i) { - if (webkit::npapi::IsPluginEnabled(all_plugins[i])) + if (webkit::IsPluginEnabled(all_plugins[i])) plugins->push_back(all_plugins[i]); } } @@ -550,14 +550,14 @@ void RenderMessageFilter::OnGetPluginInfo( const GURL& policy_url, const std::string& mime_type, bool* found, - webkit::npapi::WebPluginInfo* info, + webkit::WebPluginInfo* info, std::string* actual_mime_type) { *found = plugin_service_->GetPluginInfo( render_process_id_, routing_id, url, mime_type, info, actual_mime_type); if (*found) { if (!plugin_service_->PluginAllowedForURL(info->path, policy_url)) - info->enabled |= webkit::npapi::WebPluginInfo::POLICY_DISABLED; + info->enabled |= webkit::WebPluginInfo::POLICY_DISABLED; } } diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h index c60f21f..946d144 100644 --- a/content/browser/renderer_host/render_message_filter.h +++ b/content/browser/renderer_host/render_message_filter.h @@ -59,10 +59,8 @@ class URLRequestContextGetter; } namespace webkit { -namespace npapi { struct WebPluginInfo; } -} namespace webkit_glue { struct WebCookie; @@ -149,13 +147,13 @@ class RenderMessageFilter : public BrowserMessageFilter { #endif void OnGetPlugins(bool refresh, - std::vector<webkit::npapi::WebPluginInfo>* plugins); + std::vector<webkit::WebPluginInfo>* plugins); void OnGetPluginInfo(int routing_id, const GURL& url, const GURL& policy_url, const std::string& mime_type, bool* found, - webkit::npapi::WebPluginInfo* info, + webkit::WebPluginInfo* info, std::string* actual_mime_type); void OnOpenChannelToPlugin(int routing_id, const GURL& url, diff --git a/content/common/pepper_plugin_registry.cc b/content/common/pepper_plugin_registry.cc index 9e68f44..5654cc2 100644 --- a/content/common/pepper_plugin_registry.cc +++ b/content/common/pepper_plugin_registry.cc @@ -33,7 +33,6 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) { // <file-path> + // ["#" + <name> + ["#" + <description> + ["#" + <version>]]] + // *1( LWS + ";" + LWS + <mime-type> ) - std::vector<std::string> modules; base::SplitString(value, ',', &modules); for (size_t i = 0; i < modules.size(); ++i) { @@ -64,9 +63,9 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) { if (name_parts.size() > 3) plugin.version = name_parts[3]; for (size_t j = 1; j < parts.size(); ++j) { - webkit::npapi::WebPluginMimeType mime_type(parts[j], - std::string(), - plugin.description); + webkit::WebPluginMimeType mime_type(parts[j], + std::string(), + plugin.description); plugin.mime_types.push_back(mime_type); } @@ -76,8 +75,8 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) { } // namespace -webkit::npapi::WebPluginInfo PepperPluginInfo::ToWebPluginInfo() const { - webkit::npapi::WebPluginInfo info; +webkit::WebPluginInfo PepperPluginInfo::ToWebPluginInfo() const { + webkit::WebPluginInfo info; info.name = name.empty() ? path.BaseName().LossyDisplayName() : ASCIIToUTF16(name); @@ -86,12 +85,12 @@ webkit::npapi::WebPluginInfo PepperPluginInfo::ToWebPluginInfo() const { info.desc = ASCIIToUTF16(description); info.mime_types = mime_types; - webkit::npapi::WebPluginInfo::EnabledStates enabled_state = - webkit::npapi::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; + webkit::WebPluginInfo::EnabledStates enabled_state = + webkit::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; if (!enabled) { enabled_state = - webkit::npapi::WebPluginInfo::USER_DISABLED_POLICY_UNMANAGED; + webkit::WebPluginInfo::USER_DISABLED_POLICY_UNMANAGED; } info.enabled = enabled_state; diff --git a/content/common/pepper_plugin_registry.h b/content/common/pepper_plugin_registry.h index 5e6389e..e9fb960 100644 --- a/content/common/pepper_plugin_registry.h +++ b/content/common/pepper_plugin_registry.h @@ -13,15 +13,15 @@ #include "base/file_path.h" #include "ppapi/proxy/proxy_channel.h" -#include "webkit/plugins/npapi/webplugininfo.h" #include "webkit/plugins/ppapi/plugin_delegate.h" #include "webkit/plugins/ppapi/plugin_module.h" +#include "webkit/plugins/webplugininfo.h" struct PepperPluginInfo { PepperPluginInfo(); ~PepperPluginInfo(); - webkit::npapi::WebPluginInfo ToWebPluginInfo() const; + webkit::WebPluginInfo ToWebPluginInfo() const; // Indicates internal plugins for which there's not actually a library. // These plugins are implemented in the Chrome binary using a separate set @@ -39,7 +39,7 @@ struct PepperPluginInfo { std::string name; std::string description; std::string version; - std::vector<webkit::npapi::WebPluginMimeType> mime_types; + std::vector<webkit::WebPluginMimeType> mime_types; // When is_internal is set, this contains the function pointers to the // entry points for the internal plugins. diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 964579f..c0850c9 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -35,7 +35,7 @@ #include "webkit/glue/webpreferences.h" #include "webkit/glue/webaccessibility.h" #include "webkit/plugins/npapi/webplugin.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #if defined(OS_MACOSX) #include "content/common/font_descriptor_mac.h" @@ -393,7 +393,7 @@ IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginGeometry) IPC_STRUCT_TRAITS_MEMBER(visible) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginMimeType) +IPC_STRUCT_TRAITS_BEGIN(webkit::WebPluginMimeType) IPC_STRUCT_TRAITS_MEMBER(mime_type) IPC_STRUCT_TRAITS_MEMBER(file_extensions) IPC_STRUCT_TRAITS_MEMBER(description) @@ -401,13 +401,14 @@ IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginMimeType) IPC_STRUCT_TRAITS_MEMBER(additional_param_values) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(webkit::npapi::WebPluginInfo) +IPC_STRUCT_TRAITS_BEGIN(webkit::WebPluginInfo) IPC_STRUCT_TRAITS_MEMBER(name) IPC_STRUCT_TRAITS_MEMBER(path) IPC_STRUCT_TRAITS_MEMBER(version) IPC_STRUCT_TRAITS_MEMBER(desc) IPC_STRUCT_TRAITS_MEMBER(mime_types) IPC_STRUCT_TRAITS_MEMBER(enabled) + IPC_STRUCT_TRAITS_MEMBER(type) IPC_STRUCT_TRAITS_END() IPC_STRUCT_TRAITS_BEGIN(media::MediaLogEvent) @@ -1557,7 +1558,7 @@ IPC_SYNC_MESSAGE_CONTROL2_1(ViewHostMsg_CookiesEnabled, // Used to get the list of plugins IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins, bool /* refresh*/, - std::vector<webkit::npapi::WebPluginInfo> /* plugins */) + std::vector<webkit::WebPluginInfo> /* plugins */) // Return information about a plugin for the given URL and MIME // type. If there is no matching plugin, |found| is false. If @@ -1572,7 +1573,7 @@ IPC_SYNC_MESSAGE_CONTROL4_3(ViewHostMsg_GetPluginInfo, GURL /* policy_url */, std::string /* mime_type */, bool /* found */, - webkit::npapi::WebPluginInfo /* plugin info */, + webkit::WebPluginInfo /* plugin info */, std::string /* actual_mime_type */) // A renderer sends this to the browser process when it wants to @@ -1584,7 +1585,7 @@ IPC_SYNC_MESSAGE_CONTROL3_2(ViewHostMsg_OpenChannelToPlugin, GURL /* url */, std::string /* mime_type */, IPC::ChannelHandle /* channel_handle */, - webkit::npapi::WebPluginInfo /* info */) + webkit::WebPluginInfo /* info */) // A renderer sends this to the browser process when it wants to create a // worker. The browser will create the worker process if necessary, and diff --git a/content/renderer/render_view.cc b/content/renderer/render_view.cc index 8fea7a7..d23bf5e 100644 --- a/content/renderer/render_view.cc +++ b/content/renderer/render_view.cc @@ -552,13 +552,13 @@ void RenderView::PluginCrashed(const FilePath& plugin_path) { WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame, const WebPluginParams& params) { - webkit::npapi::WebPluginInfo info; + webkit::WebPluginInfo info; bool found; std::string mime_type; Send(new ViewHostMsg_GetPluginInfo( routing_id_, params.url, frame->top()->document().url(), params.mimeType.utf8(), &found, &info, &mime_type)); - if (!found || !webkit::npapi::IsPluginEnabled(info)) + if (!found || !webkit::IsPluginEnabled(info)) return NULL; bool pepper_plugin_was_registered = false; diff --git a/content/renderer/renderer_glue.cc b/content/renderer/renderer_glue.cc index 2896955..07b7646 100644 --- a/content/renderer/renderer_glue.cc +++ b/content/renderer/renderer_glue.cc @@ -191,7 +191,7 @@ uint64 ClipboardGetSequenceNumber() { } void GetPlugins(bool refresh, - std::vector<webkit::npapi::WebPluginInfo>* plugins) { + std::vector<webkit::WebPluginInfo>* plugins) { if (!RenderThread::current()->plugin_refresh_allowed()) refresh = false; RenderThread::current()->Send(new ViewHostMsg_GetPlugins(refresh, plugins)); diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc index cfd206b..71166b4 100644 --- a/content/renderer/webplugin_delegate_proxy.cc +++ b/content/renderer/webplugin_delegate_proxy.cc @@ -1376,7 +1376,7 @@ bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { // The move networks plugin needs to be informed of geometry updates // synchronously. - std::vector<webkit::npapi::WebPluginMimeType>::iterator index; + std::vector<webkit::WebPluginMimeType>::iterator index; for (index = info_.mime_types.begin(); index != info_.mime_types.end(); index++) { if (index->mime_type == "application/x-vnd.moveplayer.qm" || diff --git a/content/renderer/webplugin_delegate_proxy.h b/content/renderer/webplugin_delegate_proxy.h index 8bb4a70..de353b5 100644 --- a/content/renderer/webplugin_delegate_proxy.h +++ b/content/renderer/webplugin_delegate_proxy.h @@ -18,8 +18,8 @@ #include "ui/gfx/native_widget_types.h" #include "ui/gfx/rect.h" #include "ui/gfx/surface/transport_dib.h" -#include "webkit/plugins/npapi/webplugininfo.h" #include "webkit/plugins/npapi/webplugin_delegate.h" +#include "webkit/plugins/webplugininfo.h" #if defined(OS_MACOSX) #include "base/hash_tables.h" @@ -264,7 +264,7 @@ class WebPluginDelegateProxy scoped_refptr<PluginChannelHost> channel_host_; std::string mime_type_; int instance_id_; - webkit::npapi::WebPluginInfo info_; + webkit::WebPluginInfo info_; gfx::Rect plugin_rect_; gfx::Rect clip_rect_; diff --git a/ppapi/proxy/proxy_channel.cc b/ppapi/proxy/proxy_channel.cc index d304dca..c7b1ecfe 100644 --- a/ppapi/proxy/proxy_channel.cc +++ b/ppapi/proxy/proxy_channel.cc @@ -26,7 +26,7 @@ bool ProxyChannel::InitWithChannel(Delegate* delegate, IPC::Channel::Mode mode = is_client ? IPC::Channel::MODE_CLIENT : IPC::Channel::MODE_SERVER; channel_.reset(new IPC::SyncChannel(channel_handle, mode, this, - delegate->GetIPCMessageLoop(), false, + delegate->GetIPCMessageLoop(), true, delegate->GetShutdownEvent())); return true; } diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index be85c08..28f1ded 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -192,8 +192,6 @@ '../plugins/npapi/webplugin_impl.h', '../plugins/npapi/webplugin_print_delegate.cc', '../plugins/npapi/webplugin_print_delegate.h', - '../plugins/npapi/webplugininfo.cc', - '../plugins/npapi/webplugininfo.h', '../plugins/npapi/webview_plugin.cc', '../plugins/npapi/webview_plugin.h', '../plugins/plugin_switches.cc', @@ -325,6 +323,8 @@ '../plugins/ppapi/webkit_forwarding_impl.h', '../plugins/sad_plugin.cc', '../plugins/sad_plugin.h', + '../plugins/webplugininfo.cc', + '../plugins/webplugininfo.h', 'media/audio_decoder.cc', 'media/audio_decoder.h', 'media/buffered_data_source.cc', diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index 1de78e6..bc68662 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -39,10 +39,8 @@ class WebView; } namespace webkit { -namespace npapi { struct WebPluginInfo; } -} namespace webkit_glue { @@ -210,7 +208,7 @@ bool ClipboardReadFilenames(ui::Clipboard::Buffer buffer, // Embedders implement this function to return the list of plugins to Webkit. void GetPlugins(bool refresh, - std::vector<webkit::npapi::WebPluginInfo>* plugins); + std::vector<webkit::WebPluginInfo>* plugins); // Returns true if the protocol implemented to serve |url| supports features // required by the media engine. diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc index d8f88f4..d3f61d3 100644 --- a/webkit/glue/webkitclient_impl.cc +++ b/webkit/glue/webkitclient_impl.cc @@ -38,7 +38,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h" #include "webkit/glue/media/audio_decoder.h" #include "webkit/plugins/npapi/plugin_instance.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/websocketstreamhandle_impl.h" #include "webkit/glue/weburlloader_impl.h" @@ -233,18 +233,18 @@ WebString WebKitClientImpl::userAgent(const WebURL& url) { void WebKitClientImpl::getPluginList(bool refresh, WebPluginListBuilder* builder) { - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; GetPlugins(refresh, &plugins); for (size_t i = 0; i < plugins.size(); ++i) { - const webkit::npapi::WebPluginInfo& plugin = plugins[i]; + const webkit::WebPluginInfo& plugin = plugins[i]; builder->addPlugin( plugin.name, plugin.desc, FilePathStringToWebString(plugin.path.BaseName().value())); for (size_t j = 0; j < plugin.mime_types.size(); ++j) { - const webkit::npapi::WebPluginMimeType& mime_type = plugin.mime_types[j]; + const webkit::WebPluginMimeType& mime_type = plugin.mime_types[j]; builder->addMediaTypeToLastPlugin( WebString::fromUTF8(mime_type.mime_type), mime_type.description); diff --git a/webkit/plugins/npapi/plugin_group.cc b/webkit/plugins/npapi/plugin_group.cc index 5a7803d..7904f93 100644 --- a/webkit/plugins/npapi/plugin_group.cc +++ b/webkit/plugins/npapi/plugin_group.cc @@ -13,7 +13,7 @@ #include "base/values.h" #include "base/version.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" namespace webkit { namespace npapi { diff --git a/webkit/plugins/npapi/plugin_group.h b/webkit/plugins/npapi/plugin_group.h index 354c486..24d8c4c 100644 --- a/webkit/plugins/npapi/plugin_group.h +++ b/webkit/plugins/npapi/plugin_group.h @@ -14,7 +14,7 @@ #include "base/gtest_prod_util.h" #include "base/memory/scoped_ptr.h" #include "base/string16.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" class FilePath; class PluginExceptionsTableModelTest; @@ -116,10 +116,10 @@ class PluginGroup { static bool IsPluginNameEnabledByPolicy(const string16& plugin_name); // Returns true if the given plugin matches this group. - bool Match(const WebPluginInfo& plugin) const; + bool Match(const webkit::WebPluginInfo& plugin) const; // Adds the given plugin to this group. - void AddPlugin(const WebPluginInfo& plugin); + void AddPlugin(const webkit::WebPluginInfo& plugin); // Removes a plugin from the group by its path. bool RemovePlugin(const FilePath& filename); @@ -156,7 +156,7 @@ class PluginGroup { string16 GetGroupName() const; // Returns all plugins added to the group. - const std::vector<WebPluginInfo>& web_plugins_info() const { + const std::vector<webkit::WebPluginInfo>& web_plugins_info() const { return web_plugin_infos_; } @@ -198,7 +198,9 @@ class PluginGroup { // in accepting weird version strings than Version::GetFromString(). static Version* CreateVersionFromString(const string16& version_string); - std::vector<WebPluginInfo> web_plugin_infos() { return web_plugin_infos_; } + std::vector<webkit::WebPluginInfo> web_plugin_infos() { + return web_plugin_infos_; + } private: friend class PluginList; @@ -208,11 +210,11 @@ class PluginGroup { FRIEND_TEST_ALL_PREFIXES(PluginListTest, DisableOutdated); // Generates the (short) identifier string for the given plugin. - static std::string GetIdentifier(const WebPluginInfo& wpi); + static std::string GetIdentifier(const webkit::WebPluginInfo& wpi); // Generates the long identifier (based on the full file path) for the given // plugin, to be called when the short identifier is not unique. - static std::string GetLongIdentifier(const WebPluginInfo& wpi); + static std::string GetLongIdentifier(const webkit::WebPluginInfo& wpi); // Creates a PluginGroup from a PluginGroupDefinition. The caller takes // ownership of the created PluginGroup. @@ -221,7 +223,7 @@ class PluginGroup { // Creates a PluginGroup from a WebPluginInfo. The caller takes ownership of // the created PluginGroup. - static PluginGroup* FromWebPluginInfo(const WebPluginInfo& wpi); + static PluginGroup* FromWebPluginInfo(const webkit::WebPluginInfo& wpi); // Returns |true| if |version| is contained in [low, high) of |range|. static bool IsVersionInRange(const Version& version, @@ -241,11 +243,11 @@ class PluginGroup { // Set the description and version for this plugin group from the // given plug-in. - void UpdateDescriptionAndVersion(const WebPluginInfo& plugin); + void UpdateDescriptionAndVersion(const webkit::WebPluginInfo& plugin); // Updates the active plugin in the group. The active plugin is the first // enabled one, or if all plugins are disabled, simply the first one. - void UpdateActivePlugin(const WebPluginInfo& plugin); + void UpdateActivePlugin(const webkit::WebPluginInfo& plugin); // Resets the group state to its default value (as if the group was empty). // After calling this method, calling |UpdateActivePlugin| with all plugins @@ -254,20 +256,20 @@ class PluginGroup { // Enables the plugin if not already enabled and if policy allows it to. // Returns true on success. Does not update the group state. - static bool Enable(WebPluginInfo* plugin, int reason); + static bool Enable(webkit::WebPluginInfo* plugin, int reason); // Disables the plugin if not already disabled and if policy allows it to. // Returns true on success. Does not update the group state. - static bool Disable(WebPluginInfo* plugin, int reason); + static bool Disable(webkit::WebPluginInfo* plugin, int reason); // Helper function to implement the functions above. - static bool SetPluginState(WebPluginInfo* plugin, + static bool SetPluginState(webkit::WebPluginInfo* plugin, int new_reason, bool state_changes); // Returns a non-const vector of all plugins in the group. This is only used // by PluginList. - std::vector<WebPluginInfo>& GetPluginsContainer() { + std::vector<webkit::WebPluginInfo>& GetPluginsContainer() { return web_plugin_infos_; } @@ -287,7 +289,7 @@ class PluginGroup { bool enabled_; std::vector<VersionRange> version_ranges_; scoped_ptr<Version> version_; - std::vector<WebPluginInfo> web_plugin_infos_; + std::vector<webkit::WebPluginInfo> web_plugin_infos_; }; } // namespace npapi diff --git a/webkit/plugins/npapi/plugin_group_unittest.cc b/webkit/plugins/npapi/plugin_group_unittest.cc index 4e4eee5..4e7704f 100644 --- a/webkit/plugins/npapi/plugin_group_unittest.cc +++ b/webkit/plugins/npapi/plugin_group_unittest.cc @@ -13,7 +13,7 @@ #include "base/values.h" #include "base/version.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" namespace webkit { namespace npapi { @@ -150,7 +150,7 @@ TEST_F(PluginGroupTest, PluginGroupDescription) { { // Disable the second plugin. plugin3045.enabled = - webkit::npapi::WebPluginInfo::USER_DISABLED_POLICY_UNMANAGED; + webkit::WebPluginInfo::USER_DISABLED_POLICY_UNMANAGED; scoped_ptr<PluginGroup> group(PluginGroupTest::CreatePluginGroup( plugindefs[i])); EXPECT_TRUE(group->Match(plugin3043)); diff --git a/webkit/plugins/npapi/plugin_host.cc b/webkit/plugins/npapi/plugin_host.cc index 2af729e..b679d3a 100644 --- a/webkit/plugins/npapi/plugin_host.cc +++ b/webkit/plugins/npapi/plugin_host.cc @@ -27,7 +27,7 @@ #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/plugin_stream_url.h" #include "webkit/plugins/npapi/webplugin_delegate.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #if defined(OS_MACOSX) #include "base/mac/mac_util.h" @@ -601,7 +601,7 @@ const char* NPN_UserAgent(NPP id) { if (id) plugin = FindInstance(id); if (plugin.get()) { - webkit::npapi::WebPluginInfo plugin_info = + webkit::WebPluginInfo plugin_info = plugin->plugin_lib()->plugin_info(); if (plugin_info.name == ASCIIToUTF16("Silverlight Plug-In") && StartsWith(plugin_info.version, ASCIIToUTF16("4."), false)) { diff --git a/webkit/plugins/npapi/plugin_lib.cc b/webkit/plugins/npapi/plugin_lib.cc index 28d6b6c..f333f8e 100644 --- a/webkit/plugins/npapi/plugin_lib.cc +++ b/webkit/plugins/npapi/plugin_lib.cc @@ -34,7 +34,7 @@ PluginLib* PluginLib::CreatePluginLib(const FilePath& filename) { return (*g_loaded_libs)[i]; } - WebPluginInfo info; + webkit::WebPluginInfo info; const PluginEntryPoints* entry_points = NULL; if (!PluginList::Singleton()->ReadPluginInfo(filename, &info, &entry_points)) return NULL; @@ -65,7 +65,7 @@ void PluginLib::ShutdownAllPlugins() { } } -PluginLib::PluginLib(const WebPluginInfo& info, +PluginLib::PluginLib(const webkit::WebPluginInfo& info, const PluginEntryPoints* entry_points) : web_plugin_info_(info), library_(NULL), diff --git a/webkit/plugins/npapi/plugin_lib.h b/webkit/plugins/npapi/plugin_lib.h index e501ccb..3ae5d9e 100644 --- a/webkit/plugins/npapi/plugin_lib.h +++ b/webkit/plugins/npapi/plugin_lib.h @@ -16,7 +16,6 @@ #include "webkit/plugins/npapi/webplugin.h" class FilePath; -struct WebPluginInfo; namespace webkit { namespace npapi { @@ -32,18 +31,19 @@ class PluginLib : public base::RefCounted<PluginLib> { // Creates a WebPluginInfo structure given a plugin's path. On success // returns true, with the information being put into "info". // Returns false if the library couldn't be found, or if it's not a plugin. - static bool ReadWebPluginInfo(const FilePath& filename, WebPluginInfo* info); + static bool ReadWebPluginInfo(const FilePath& filename, + webkit::WebPluginInfo* info); #if defined(OS_POSIX) && !defined(OS_MACOSX) // Parse the result of an NP_GetMIMEDescription() call. // This API is only used on Unixes, and is exposed here for testing. static void ParseMIMEDescription(const std::string& description, - std::vector<WebPluginMimeType>* mime_types); + std::vector<webkit::WebPluginMimeType>* mime_types); // Extract a version number from a description string. // This API is only used on Unixes, and is exposed here for testing. static void ExtractVersionString(const std::string& version, - WebPluginInfo* info); + webkit::WebPluginInfo* info); #endif // Unloads all the loaded plugin libraries and cleans up the plugin map. @@ -63,7 +63,7 @@ class PluginLib : public base::RefCounted<PluginLib> { // Gets information about this plugin and the mime types that it // supports. - const WebPluginInfo& plugin_info() { return web_plugin_info_; } + const webkit::WebPluginInfo& plugin_info() { return web_plugin_info_; } bool internal() { return internal_; } @@ -102,7 +102,7 @@ class PluginLib : public base::RefCounted<PluginLib> { // Creates a new PluginLib. // |entry_points| is non-NULL for internal plugins. - PluginLib(const WebPluginInfo& info, + PluginLib(const webkit::WebPluginInfo& info, const PluginEntryPoints* entry_points); virtual ~PluginLib(); @@ -119,7 +119,7 @@ class PluginLib : public base::RefCounted<PluginLib> { private: bool internal_; // True for plugins that are built-in into chrome binaries. - WebPluginInfo web_plugin_info_; // Supported mime types, description + webkit::WebPluginInfo web_plugin_info_; // Supported mime types, description base::NativeLibrary library_; // The opened library reference. NPPluginFuncs plugin_funcs_; // The struct of plugin side functions. bool initialized_; // Is the plugin initialized? diff --git a/webkit/plugins/npapi/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc index 1fae6b3..197cb80 100644 --- a/webkit/plugins/npapi/plugin_list.cc +++ b/webkit/plugins/npapi/plugin_list.cc @@ -210,7 +210,7 @@ void PluginList::AddExtraPluginDir(const FilePath& plugin_dir) { #endif } -void PluginList::RegisterInternalPlugin(const WebPluginInfo& info) { +void PluginList::RegisterInternalPlugin(const webkit::WebPluginInfo& info) { PluginEntryPoints entry_points = {0}; InternalPlugin plugin = { info, entry_points }; @@ -230,9 +230,9 @@ void PluginList::RegisterInternalPlugin(const FilePath& filename, plugin.info.name = ASCIIToUTF16(name); plugin.info.version = ASCIIToUTF16("1"); plugin.info.desc = ASCIIToUTF16(description); - plugin.info.enabled = WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; + plugin.info.enabled = webkit::WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED; - WebPluginMimeType mime_type; + webkit::WebPluginMimeType mime_type; mime_type.mime_type = mime_type_str; plugin.info.mime_types.push_back(mime_type); @@ -256,7 +256,7 @@ void PluginList::UnregisterInternalPlugin(const FilePath& path) { } bool PluginList::ReadPluginInfo(const FilePath& filename, - WebPluginInfo* info, + webkit::WebPluginInfo* info, const PluginEntryPoints** entry_points) { { base::AutoLock lock(lock_); @@ -280,7 +280,7 @@ bool PluginList::ParseMimeTypes( const std::string& mime_types_str, const std::string& file_extensions_str, const string16& mime_type_descriptions_str, - std::vector<WebPluginMimeType>* parsed_mime_types) { + std::vector<webkit::WebPluginMimeType>* parsed_mime_types) { std::vector<std::string> mime_types, file_extensions; std::vector<string16> descriptions; base::SplitString(mime_types_str, '|', &mime_types); @@ -411,9 +411,9 @@ void PluginList::LoadPlugins() { base::AutoLock lock(lock_); // Grab all plugins that were found before to copy enabled statuses. - std::vector<WebPluginInfo> old_plugins; + std::vector<webkit::WebPluginInfo> old_plugins; for (size_t i = 0; i < plugin_groups_.size(); ++i) { - const std::vector<WebPluginInfo>& gr_plugins = + const std::vector<webkit::WebPluginInfo>& gr_plugins = plugin_groups_[i]->web_plugins_info(); old_plugins.insert(old_plugins.end(), gr_plugins.begin(), gr_plugins.end()); } @@ -422,7 +422,8 @@ void PluginList::LoadPlugins() { PluginGroup* group = new_plugin_groups[i]; string16 group_name = group->GetGroupName(); - std::vector<WebPluginInfo>& gr_plugins = group->GetPluginsContainer(); + std::vector<webkit::WebPluginInfo>& gr_plugins = + group->GetPluginsContainer(); for (size_t j = 0; j < gr_plugins.size(); ++j) { int plugin_found = -1; for (size_t k = 0; k < old_plugins.size(); ++k) { @@ -495,7 +496,7 @@ void PluginList::GetPlugins(std::vector<WebPluginInfo>* plugins) { LoadPlugins(); base::AutoLock lock(lock_); for (size_t i = 0; i < plugin_groups_.size(); ++i) { - const std::vector<WebPluginInfo>& gr_plugins = + const std::vector<webkit::WebPluginInfo>& gr_plugins = plugin_groups_[i]->web_plugins_info(); plugins->insert(plugins->end(), gr_plugins.begin(), gr_plugins.end()); } @@ -506,7 +507,7 @@ void PluginList::GetPluginInfoArray( const std::string& mime_type, bool allow_wildcard, bool* use_stale, - std::vector<WebPluginInfo>* info, + std::vector<webkit::WebPluginInfo>* info, std::vector<std::string>* actual_mime_types) { DCHECK(mime_type == StringToLowerASCII(mime_type)); DCHECK(info); @@ -524,7 +525,7 @@ void PluginList::GetPluginInfoArray( // Add in enabled plugins by mime type. for (size_t i = 0; i < plugin_groups_.size(); ++i) { - const std::vector<WebPluginInfo>& plugins = + const std::vector<webkit::WebPluginInfo>& plugins = plugin_groups_[i]->web_plugins_info(); for (size_t i = 0; i < plugins.size(); ++i) { if (IsPluginEnabled(plugins[i]) && SupportsType(plugins[i], @@ -547,7 +548,7 @@ void PluginList::GetPluginInfoArray( std::string extension = StringToLowerASCII(std::string(path, last_dot+1)); std::string actual_mime_type; for (size_t i = 0; i < plugin_groups_.size(); ++i) { - const std::vector<WebPluginInfo>& plugins = + const std::vector<webkit::WebPluginInfo>& plugins = plugin_groups_[i]->web_plugins_info(); for (size_t i = 0; i < plugins.size(); ++i) { if (IsPluginEnabled(plugins[i]) && @@ -566,7 +567,7 @@ void PluginList::GetPluginInfoArray( // Add in disabled plugins by mime type. for (size_t i = 0; i < plugin_groups_.size(); ++i) { - const std::vector<WebPluginInfo>& plugins = + const std::vector<webkit::WebPluginInfo>& plugins = plugin_groups_[i]->web_plugins_info(); for (size_t i = 0; i < plugins.size(); ++i) { if (!IsPluginEnabled(plugins[i]) && @@ -593,7 +594,7 @@ void PluginList::GetPluginInfoArray( kDefaultPluginLibraryName) == 0) { #endif DCHECK_NE(0U, plugin_groups_[i]->web_plugins_info().size()); - const WebPluginInfo& default_info = + const webkit::WebPluginInfo& default_info = plugin_groups_[i]->web_plugins_info()[0]; if (SupportsType(default_info, mime_type, allow_wildcard)) { info->push_back(default_info); @@ -605,11 +606,11 @@ void PluginList::GetPluginInfoArray( } bool PluginList::GetPluginInfoByPath(const FilePath& plugin_path, - WebPluginInfo* info) { + webkit::WebPluginInfo* info) { LoadPlugins(); base::AutoLock lock(lock_); for (size_t i = 0; i < plugin_groups_.size(); ++i) { - const std::vector<WebPluginInfo>& plugins = + const std::vector<webkit::WebPluginInfo>& plugins = plugin_groups_[i]->web_plugins_info(); for (size_t i = 0; i < plugins.size(); ++i) { if (plugins[i].path == plugin_path) { @@ -638,7 +639,7 @@ void PluginList::GetPluginGroups( } const PluginGroup* PluginList::GetPluginGroup( - const WebPluginInfo& web_plugin_info) { + const webkit::WebPluginInfo& web_plugin_info) { base::AutoLock lock(lock_); return AddToPluginGroups(web_plugin_info, &plugin_groups_); } @@ -652,7 +653,7 @@ string16 PluginList::GetPluginGroupName(const std::string& identifier) { } std::string PluginList::GetPluginGroupIdentifier( - const WebPluginInfo& web_plugin_info) { + const webkit::WebPluginInfo& web_plugin_info) { base::AutoLock lock(lock_); PluginGroup* group = AddToPluginGroups(web_plugin_info, &plugin_groups_); return group->identifier(); @@ -666,7 +667,7 @@ void PluginList::AddHardcodedPluginGroups(ScopedVector<PluginGroup>* groups) { } PluginGroup* PluginList::AddToPluginGroups( - const WebPluginInfo& web_plugin_info, + const webkit::WebPluginInfo& web_plugin_info, ScopedVector<PluginGroup>* plugin_groups) { PluginGroup* group = NULL; for (size_t i = 0; i < plugin_groups->size(); ++i) { @@ -747,7 +748,7 @@ bool PluginList::EnableGroup(bool enable, const string16& group_name) { return group->EnableGroup(enable); } -bool PluginList::SupportsType(const WebPluginInfo& plugin, +bool PluginList::SupportsType(const webkit::WebPluginInfo& plugin, const std::string& mime_type, bool allow_wildcard) { // Webkit will ask for a plugin to handle empty mime types. @@ -755,7 +756,7 @@ bool PluginList::SupportsType(const WebPluginInfo& plugin, return false; for (size_t i = 0; i < plugin.mime_types.size(); ++i) { - const WebPluginMimeType& mime_info = plugin.mime_types[i]; + const webkit::WebPluginMimeType& mime_info = plugin.mime_types[i]; if (net::MatchesMimeType(mime_info.mime_type, mime_type)) { if (!allow_wildcard && mime_info.mime_type == "*") continue; @@ -765,11 +766,11 @@ bool PluginList::SupportsType(const WebPluginInfo& plugin, return false; } -bool PluginList::SupportsExtension(const WebPluginInfo& plugin, +bool PluginList::SupportsExtension(const webkit::WebPluginInfo& plugin, const std::string& extension, std::string* actual_mime_type) { for (size_t i = 0; i < plugin.mime_types.size(); ++i) { - const WebPluginMimeType& mime_type = plugin.mime_types[i]; + const webkit::WebPluginMimeType& mime_type = plugin.mime_types[i]; for (size_t j = 0; j < mime_type.file_extensions.size(); ++j) { if (mime_type.file_extensions[j] == extension) { if (actual_mime_type) diff --git a/webkit/plugins/npapi/plugin_list.h b/webkit/plugins/npapi/plugin_list.h index 46c0bf6..3e5a804 100644 --- a/webkit/plugins/npapi/plugin_list.h +++ b/webkit/plugins/npapi/plugin_list.h @@ -17,7 +17,7 @@ #include "base/synchronization/lock.h" #include "third_party/npapi/bindings/nphostapi.h" #include "webkit/plugins/npapi/plugin_group.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" class GURL; @@ -80,7 +80,7 @@ class PluginList { // Register an internal plugin with the specified plugin information. // An internal plugin must be registered before it can // be loaded using PluginList::LoadPlugin(). - void RegisterInternalPlugin(const WebPluginInfo& info); + void RegisterInternalPlugin(const webkit::WebPluginInfo& info); // This second version is for "plugins" that have been compiled // directly into the binary -- callers must provide the metadata and @@ -105,20 +105,21 @@ class PluginList { // internally-owned PluginEntryPoints pointer. // Returns false if the library couldn't be found, or if it's not a plugin. bool ReadPluginInfo(const FilePath& filename, - WebPluginInfo* info, + webkit::WebPluginInfo* info, const PluginEntryPoints** entry_points); // In Windows plugins, the mime types are passed as a specially formatted list // of strings. This function parses those strings into a WebPluginMimeType // vector. // TODO(evan): move this code into plugin_list_win. - static bool ParseMimeTypes(const std::string& mime_types, - const std::string& file_extensions, - const string16& mime_type_descriptions, - std::vector<WebPluginMimeType>* parsed_mime_types); + static bool ParseMimeTypes( + const std::string& mime_types, + const std::string& file_extensions, + const string16& mime_type_descriptions, + std::vector<webkit::WebPluginMimeType>* parsed_mime_types); // Get all the plugins. - void GetPlugins(std::vector<WebPluginInfo>* plugins); + void GetPlugins(std::vector<webkit::WebPluginInfo>* plugins); // Returns a list in |info| containing plugins that are found for // the given url and mime type (including disabled plugins, for @@ -137,13 +138,13 @@ class PluginList { const std::string& mime_type, bool allow_wildcard, bool* use_stale, - std::vector<WebPluginInfo>* info, + std::vector<webkit::WebPluginInfo>* info, std::vector<std::string>* actual_mime_types); // Get plugin info by plugin path (including disabled plugins). Returns true // if the plugin is found and WebPluginInfo has been filled in |info|. bool GetPluginInfoByPath(const FilePath& plugin_path, - WebPluginInfo* info); + webkit::WebPluginInfo* info); // Populates the given vector with all available plugin groups. void GetPluginGroups(bool load_if_necessary, @@ -157,7 +158,8 @@ class PluginList { // call to |GetPlugins()|, |GetEnabledPlugins()|, |GetPluginInfoArray()|, // |GetPluginInfoByPath()|, or |GetPluginGroups(true, _)|. It is the caller's // responsibility to make sure this doesn't happen. - const PluginGroup* GetPluginGroup(const WebPluginInfo& web_plugin_info); + const PluginGroup* GetPluginGroup( + const webkit::WebPluginInfo& web_plugin_info); // Returns the name of the PluginGroup with the given identifier. // If no such group exists, an empty string is returned. @@ -166,7 +168,8 @@ class PluginList { // Returns the identifier string of the PluginGroup corresponding to the given // WebPluginInfo. If no such group exists, it is created and added to the // cache. - std::string GetPluginGroupIdentifier(const WebPluginInfo& web_plugin_info); + std::string GetPluginGroupIdentifier( + const webkit::WebPluginInfo& web_plugin_info); // Load a specific plugin with full path. void LoadPlugin(const FilePath& filename, @@ -206,7 +209,7 @@ class PluginList { // Adds the given WebPluginInfo to its corresponding group, creating it if // necessary, and returns the group. // Callers need to protect calls to this method by a lock themselves. - PluginGroup* AddToPluginGroups(const WebPluginInfo& web_plugin_info, + PluginGroup* AddToPluginGroups(const webkit::WebPluginInfo& web_plugin_info, ScopedVector<PluginGroup>* plugin_groups); private: @@ -240,7 +243,7 @@ class PluginList { // Returns true if we should load the given plugin, or false otherwise. // plugins is the list of plugins we have crawled in the current plugin // loading run. - bool ShouldLoadPlugin(const WebPluginInfo& info, + bool ShouldLoadPlugin(const webkit::WebPluginInfo& info, ScopedVector<PluginGroup>* plugins); // Return whether a plug-in group with the given name should be disabled, @@ -251,7 +254,7 @@ class PluginList { // Returns true if the plugin supports |mime_type|. |mime_type| should be all // lower case. - bool SupportsType(const WebPluginInfo& plugin, + bool SupportsType(const webkit::WebPluginInfo& plugin, const std::string& mime_type, bool allow_wildcard); @@ -259,7 +262,7 @@ class PluginList { // |extension| should be all lower case. If |mime_type| is not NULL, it will // be set to the MIME type if found. The MIME type which corresponds to the // extension is optionally returned back. - bool SupportsExtension(const WebPluginInfo& plugin, + bool SupportsExtension(const webkit::WebPluginInfo& plugin, const std::string& extension, std::string* actual_mime_type); @@ -298,7 +301,7 @@ class PluginList { std::vector<FilePath> extra_plugin_dirs_; struct InternalPlugin { - WebPluginInfo info; + webkit::WebPluginInfo info; PluginEntryPoints entry_points; }; // Holds information about internal plugins. diff --git a/webkit/plugins/npapi/plugin_list_win.cc b/webkit/plugins/npapi/plugin_list_win.cc index cbd16ca..b739771 100644 --- a/webkit/plugins/npapi/plugin_list_win.cc +++ b/webkit/plugins/npapi/plugin_list_win.cc @@ -313,8 +313,8 @@ void PluginList::LoadPluginsFromRegistry( // Returns true if the given plugins share at least one mime type. This is used // to differentiate newer versions of a plugin vs two plugins which happen to // have the same filename. -bool HaveSharedMimeType(const WebPluginInfo& plugin1, - const WebPluginInfo& plugin2) { +bool HaveSharedMimeType(const webkit::WebPluginInfo& plugin1, + const webkit::WebPluginInfo& plugin2) { for (size_t i = 0; i < plugin1.mime_types.size(); ++i) { for (size_t j = 0; j < plugin2.mime_types.size(); ++j) { if (plugin1.mime_types[i].mime_type == plugin2.mime_types[j].mime_type) @@ -352,12 +352,12 @@ bool IsNewerVersion(const std::wstring& a, const std::wstring& b) { return false; } -bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, +bool PluginList::ShouldLoadPlugin(const webkit::WebPluginInfo& info, ScopedVector<PluginGroup>* plugin_groups) { // Version check for (size_t i = 0; i < plugin_groups->size(); ++i) { - const std::vector<WebPluginInfo>& plugins = + const std::vector<webkit::WebPluginInfo>& plugins = (*plugin_groups)[i]->web_plugins_info(); for (size_t j = 0; j < plugins.size(); ++j) { std::wstring plugin1 = @@ -419,7 +419,7 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, return false; for (size_t i = 0; i < plugin_groups->size(); ++i) { - const std::vector<WebPluginInfo>& plugins = + const std::vector<webkit::WebPluginInfo>& plugins = (*plugin_groups)[i]->web_plugins_info(); for (size_t j = 0; j < plugins.size(); ++j) { if (plugins[j].path.BaseName().value() == kOldWMPPlugin) { @@ -430,7 +430,7 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, } } else if (filename == kOldWMPPlugin) { for (size_t i = 0; i < plugin_groups->size(); ++i) { - const std::vector<WebPluginInfo>& plugins = + const std::vector<webkit::WebPluginInfo>& plugins = (*plugin_groups)[i]->web_plugins_info(); for (size_t j = 0; j < plugins.size(); ++j) { if (plugins[j].path.BaseName().value() == kNewWMPPlugin) diff --git a/webkit/plugins/npapi/webplugininfo.cc b/webkit/plugins/webplugininfo.cc index 94fb8548..fb30646 100644 --- a/webkit/plugins/npapi/webplugininfo.cc +++ b/webkit/plugins/webplugininfo.cc @@ -2,13 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #include "base/logging.h" #include "base/utf_string_conversions.h" namespace webkit { -namespace npapi { WebPluginMimeType::WebPluginMimeType() {} @@ -24,7 +23,7 @@ WebPluginMimeType::WebPluginMimeType(const std::string& m, WebPluginMimeType::~WebPluginMimeType() {} WebPluginInfo::WebPluginInfo() - : enabled(USER_DISABLED_POLICY_UNMANAGED) { + : enabled(USER_DISABLED_POLICY_UNMANAGED), type(PLUGIN_TYPE_NPAPI) { } WebPluginInfo::WebPluginInfo(const WebPluginInfo& rhs) @@ -33,7 +32,8 @@ WebPluginInfo::WebPluginInfo(const WebPluginInfo& rhs) version(rhs.version), desc(rhs.desc), mime_types(rhs.mime_types), - enabled(rhs.enabled) { + enabled(rhs.enabled), + type(rhs.type) { } WebPluginInfo::~WebPluginInfo() {} @@ -45,6 +45,7 @@ WebPluginInfo& WebPluginInfo::operator=(const WebPluginInfo& rhs) { desc = rhs.desc; mime_types = rhs.mime_types; enabled = rhs.enabled; + type = rhs.type; return *this; } @@ -57,7 +58,8 @@ WebPluginInfo::WebPluginInfo(const string16& fake_name, version(fake_version), desc(fake_desc), mime_types(), - enabled(USER_ENABLED_POLICY_UNMANAGED) { + enabled(USER_ENABLED_POLICY_UNMANAGED), + type(PLUGIN_TYPE_NPAPI) { } bool IsPluginEnabled(const WebPluginInfo& plugin) { @@ -65,5 +67,4 @@ bool IsPluginEnabled(const WebPluginInfo& plugin) { plugin.enabled == WebPluginInfo::USER_ENABLED_POLICY_UNMANAGED); } -} // namespace npapi } // namespace webkit diff --git a/webkit/plugins/npapi/webplugininfo.h b/webkit/plugins/webplugininfo.h index 1cb625a..35427a9 100644 --- a/webkit/plugins/npapi/webplugininfo.h +++ b/webkit/plugins/webplugininfo.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGININFO_H_ -#define WEBKIT_PLUGINS_NPAPI_WEBPLUGININFO_H_ +#ifndef WEBKIT_PLUGINS_WEBPLUGININFO_H_ +#define WEBKIT_PLUGINS_WEBPLUGININFO_H_ #include <string> #include <vector> @@ -12,10 +12,7 @@ #include "base/file_path.h" namespace webkit { -namespace npapi { -// Describes a mime type entry for a plugin. -// TODO(viettrungluu): This isn't NPAPI-specific. Move this somewhere else. struct WebPluginMimeType { WebPluginMimeType(); // A constructor for the common case of a single file extension and an ASCII @@ -39,7 +36,7 @@ struct WebPluginMimeType { std::vector<string16> additional_param_values; }; -// Describes an available NPAPI plugin. +// Describes an available NPAPI or Pepper plugin. struct WebPluginInfo { // Defines the possible enabled state a plugin can have. // The enum values actually represent a 3-bit bitfield : @@ -67,6 +64,12 @@ struct WebPluginInfo { POLICY_UNMANAGED = -1 }; + enum PluginType { + PLUGIN_TYPE_NPAPI, + PLUGIN_TYPE_PEPPER_IN_PROCESS, + PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS + }; + WebPluginInfo(); WebPluginInfo(const WebPluginInfo& rhs); ~WebPluginInfo(); @@ -95,12 +98,14 @@ struct WebPluginInfo { // Enabled state of the plugin. See the EnabledStates enum. int enabled; + + // Plugin type. See the PluginType enum. + int type; }; // Checks whether a plugin is enabled either by the user or by policy. bool IsPluginEnabled(const WebPluginInfo& plugin); -} // namespace npapi } // namespace webkit -#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGININFO_H_ +#endif // WEBKIT_PLUGINS_WEBPLUGININFO_H_ diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc index c0c6766..8f8a514 100644 --- a/webkit/support/webkit_support.cc +++ b/webkit/support/webkit_support.cc @@ -49,7 +49,7 @@ #include "webkit/plugins/npapi/plugin_list.h" #include "webkit/plugins/npapi/webplugin_impl.h" #include "webkit/plugins/npapi/webplugin_page_delegate.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #include "webkit/support/platform_support.h" #include "webkit/support/simple_database_system.h" #include "webkit/support/test_webplugin_page_delegate.h" @@ -282,7 +282,7 @@ WebKit::WebKitClient* GetWebKitClient() { WebPlugin* CreateWebPlugin(WebFrame* frame, const WebPluginParams& params) { const bool kAllowWildcard = true; - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; std::vector<std::string> mime_types; webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( params.url, params.mimeType.utf8(), kAllowWildcard, diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc index ef67877..968b649 100644 --- a/webkit/support/webkit_support_glue.cc +++ b/webkit/support/webkit_support_glue.cc @@ -15,7 +15,7 @@ namespace webkit_glue { void GetPlugins(bool refresh, - std::vector<webkit::npapi::WebPluginInfo>* plugins) { + std::vector<webkit::WebPluginInfo>* plugins) { if (refresh) webkit::npapi::PluginList::Singleton()->RefreshPlugins(); webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); @@ -27,7 +27,7 @@ void GetPlugins(bool refresh, FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), }; for (int i = plugins->size() - 1; i >= 0; --i) { - webkit::npapi::WebPluginInfo plugin_info = plugins->at(i); + webkit::WebPluginInfo plugin_info = plugins->at(i); for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc index 46d9184..d4315a7 100644 --- a/webkit/tools/test_shell/test_shell.cc +++ b/webkit/tools/test_shell/test_shell.cc @@ -48,7 +48,7 @@ #include "webkit/glue/webkit_glue.h" #include "webkit/glue/webpreferences.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/webplugininfo.h" +#include "webkit/plugins/webplugininfo.h" #include "webkit/tools/test_shell/notification_presenter.h" #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" #include "webkit/tools/test_shell/test_navigation_controller.h" @@ -684,7 +684,7 @@ bool GetFontTable(int fd, uint32_t table, uint8_t* output, #endif void GetPlugins(bool refresh, - std::vector<webkit::npapi::WebPluginInfo>* plugins) { + std::vector<webkit::WebPluginInfo>* plugins) { if (refresh) webkit::npapi::PluginList::Singleton()->RefreshPlugins(); webkit::npapi::PluginList::Singleton()->GetPlugins(plugins); @@ -696,7 +696,7 @@ void GetPlugins(bool refresh, FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), }; for (int i = plugins->size() - 1; i >= 0; --i) { - webkit::npapi::WebPluginInfo plugin_info = plugins->at(i); + webkit::WebPluginInfo plugin_info = plugins->at(i); for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) { webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path); diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 5e9af04..3b107a1 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -593,7 +593,7 @@ WebScreenInfo TestWebViewDelegate::screenInfo() { WebPlugin* TestWebViewDelegate::createPlugin(WebFrame* frame, const WebPluginParams& params) { bool allow_wildcard = true; - std::vector<webkit::npapi::WebPluginInfo> plugins; + std::vector<webkit::WebPluginInfo> plugins; std::vector<std::string> mime_types; webkit::npapi::PluginList::Singleton()->GetPluginInfoArray( params.url, params.mimeType.utf8(), allow_wildcard, |