diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-21 04:29:20 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-21 04:29:20 +0000 |
commit | d7bd3e5a343acc7a5a51dd51d44f19e3abbfd41a (patch) | |
tree | 58b9de096179d94ab1fa05470340709e76cfdf49 | |
parent | ec7293192cc51edb8a89f084a165d384f5f82ab9 (diff) | |
download | chromium_src-d7bd3e5a343acc7a5a51dd51d44f19e3abbfd41a.zip chromium_src-d7bd3e5a343acc7a5a51dd51d44f19e3abbfd41a.tar.gz chromium_src-d7bd3e5a343acc7a5a51dd51d44f19e3abbfd41a.tar.bz2 |
Move webplugininfo.h to content/public.
BUG=237249
TBR=scottmg
Review URL: https://codereview.chromium.org/19894003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212812 0039d316-1c4b-4281-b951-d872f2087c98
114 files changed, 472 insertions, 540 deletions
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index d29cc1c..ea10c51 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -139,6 +139,7 @@ #include "content/public/common/drop_data.h" #include "content/public/common/geoposition.h" #include "content/public/common/ssl_status.h" +#include "content/public/common/webplugininfo.h" #include "extensions/browser/view_type_utils.h" #include "extensions/common/url_pattern.h" #include "extensions/common/url_pattern_set.h" @@ -147,7 +148,6 @@ #include "ui/base/events/event_constants.h" #include "ui/base/keycodes/keyboard_codes.h" #include "ui/base/ui_base_types.h" -#include "webkit/plugins/webplugininfo.h" #if defined(ENABLE_CONFIGURATION_POLICY) #include "chrome/browser/policy/policy_service.h" @@ -3058,11 +3058,11 @@ void TestingAutomationProvider::GetPluginsInfoCallback( Browser* browser, DictionaryValue* args, IPC::Message* reply_message, - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(browser->profile()).get(); ListValue* items = new ListValue; - for (std::vector<webkit::WebPluginInfo>::const_iterator it = + for (std::vector<content::WebPluginInfo>::const_iterator it = plugins.begin(); it != plugins.end(); ++it) { @@ -3074,7 +3074,7 @@ void TestingAutomationProvider::GetPluginsInfoCallback( item->SetBoolean("enabled", plugin_prefs->IsPluginEnabled(*it)); // Add info about mime types. ListValue* mime_types = new ListValue(); - for (std::vector<webkit::WebPluginMimeType>::const_iterator type_it = + for (std::vector<content::WebPluginMimeType>::const_iterator type_it = it->mime_types.begin(); type_it != it->mime_types.end(); ++type_it) { diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index df1fadb..7aad785 100644 --- a/chrome/browser/automation/testing_automation_provider.h +++ b/chrome/browser/automation/testing_automation_provider.h @@ -38,16 +38,13 @@ class DictionaryValue; namespace content { class RenderViewHost; struct NativeWebKeyboardEvent; +struct WebPluginInfo; } namespace gfx { class Rect; } -namespace webkit { -struct WebPluginInfo; -} - // This is an automation provider containing testing calls. class TestingAutomationProvider : public AutomationProvider, public chrome::BrowserListObserver, @@ -402,7 +399,7 @@ class TestingAutomationProvider : public AutomationProvider, void GetPluginsInfoCallback(Browser* browser, base::DictionaryValue* args, IPC::Message* reply_message, - const std::vector<webkit::WebPluginInfo>& plugins); + const std::vector<content::WebPluginInfo>& plugins); // Enable a plugin. // Uses the JSON interface for input/output. diff --git a/chrome/browser/chrome_plugin_browsertest.cc b/chrome/browser/chrome_plugin_browsertest.cc index d7b76b0..6b2bcba 100644 --- a/chrome/browser/chrome_plugin_browsertest.cc +++ b/chrome/browser/chrome_plugin_browsertest.cc @@ -23,11 +23,11 @@ #include "content/public/browser/plugin_service.h" #include "content/public/common/content_paths.h" #include "content/public/common/process_type.h" +#include "content/public/common/webplugininfo.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/test_utils.h" #include "net/base/net_util.h" #include "webkit/plugins/plugin_constants.h" -#include "webkit/plugins/webplugininfo.h" using content::BrowserThread; @@ -106,16 +106,16 @@ class ChromePluginTest : public InProcessBrowserTest { static void GetFlashPath(std::vector<base::FilePath>* paths) { paths->clear(); - std::vector<webkit::WebPluginInfo> plugins = GetPlugins(); - for (std::vector<webkit::WebPluginInfo>::const_iterator it = + std::vector<content::WebPluginInfo> plugins = GetPlugins(); + for (std::vector<content::WebPluginInfo>::const_iterator it = plugins.begin(); it != plugins.end(); ++it) { if (it->name == ASCIIToUTF16(kFlashPluginName)) paths->push_back(it->path); } } - static std::vector<webkit::WebPluginInfo> GetPlugins() { - std::vector<webkit::WebPluginInfo> plugins; + static std::vector<content::WebPluginInfo> GetPlugins() { + std::vector<content::WebPluginInfo> plugins; scoped_refptr<content::MessageLoopRunner> runner = new content::MessageLoopRunner; content::PluginService::GetInstance()->GetPlugins( @@ -170,9 +170,9 @@ class ChromePluginTest : public InProcessBrowserTest { } static void GetPluginsInfoCallback( - std::vector<webkit::WebPluginInfo>* rv, + std::vector<content::WebPluginInfo>* rv, const base::Closure& quit_task, - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { *rv = plugins; quit_task.Run(); } @@ -252,7 +252,7 @@ IN_PROC_BROWSER_TEST_F(ChromePluginTest, InstalledPlugins) { #endif }; - std::vector<webkit::WebPluginInfo> plugins = GetPlugins(); + std::vector<content::WebPluginInfo> plugins = GetPlugins(); for (size_t i = 0; i < ARRAYSIZE_UNSAFE(expected); ++i) { size_t j = 0; for (; j < plugins.size(); ++j) { diff --git a/chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc index 4ce88d2..60ead11 100644 --- a/chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc +++ b/chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc @@ -49,6 +49,7 @@ #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" #include "content/public/common/pepper_plugin_info.h" +#include "content/public/common/webplugininfo.h" #include "grit/generated_resources.h" #include "net/base/escape.h" #include "net/base/mime_util.h" @@ -60,7 +61,6 @@ #include "webkit/browser/fileapi/file_system_operation_runner.h" #include "webkit/browser/fileapi/file_system_url.h" #include "webkit/common/fileapi/file_system_util.h" -#include "webkit/plugins/webplugininfo.h" using base::DictionaryValue; using base::ListValue; diff --git a/chrome/browser/component_updater/pepper_flash_component_installer.cc b/chrome/browser/component_updater/pepper_flash_component_installer.cc index 118a17e9..0897fe6 100644 --- a/chrome/browser/component_updater/pepper_flash_component_installer.cc +++ b/chrome/browser/component_updater/pepper_flash_component_installer.cc @@ -155,18 +155,18 @@ bool MakePepperFlashPluginInfo(const base::FilePath& flash_path, plugin_info->version = flash_version.GetString(); - webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, - kFlashPluginSwfExtension, - kFlashPluginName); + content::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, + kFlashPluginSwfExtension, + kFlashPluginName); plugin_info->mime_types.push_back(swf_mime_type); - webkit::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType, - kFlashPluginSplExtension, - kFlashPluginName); + content::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType, + kFlashPluginSplExtension, + kFlashPluginName); plugin_info->mime_types.push_back(spl_mime_type); return true; } -bool IsPepperFlash(const webkit::WebPluginInfo& plugin) { +bool IsPepperFlash(const content::WebPluginInfo& plugin) { // We try to recognize Pepper Flash by the following criteria: // * It is a Pepper plug-in. // * It has the special Flash permissions. @@ -181,9 +181,9 @@ void RegisterPepperFlashWithChrome(const base::FilePath& path, if (!MakePepperFlashPluginInfo(path, version, true, &plugin_info)) return; - std::vector<webkit::WebPluginInfo> plugins; + std::vector<content::WebPluginInfo> plugins; PluginService::GetInstance()->GetInternalPlugins(&plugins); - for (std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin(); + for (std::vector<content::WebPluginInfo>::const_iterator it = plugins.begin(); it != plugins.end(); ++it) { if (!IsPepperFlash(*it)) continue; diff --git a/chrome/browser/component_updater/widevine_cdm_component_installer.cc b/chrome/browser/component_updater/widevine_cdm_component_installer.cc index 400b94f..cdb9f24 100644 --- a/chrome/browser/component_updater/widevine_cdm_component_installer.cc +++ b/chrome/browser/component_updater/widevine_cdm_component_installer.cc @@ -134,7 +134,7 @@ bool MakeWidevineCdmPluginInfo(const base::FilePath& path, plugin_info->name = kWidevineCdmDisplayName; plugin_info->description = kWidevineCdmDescription; plugin_info->version = version.GetString(); - webkit::WebPluginMimeType widevine_cdm_mime_type( + content::WebPluginMimeType widevine_cdm_mime_type( kWidevineCdmPluginMimeType, kWidevineCdmPluginExtension, kWidevineCdmPluginMimeTypeDescription); diff --git a/chrome/browser/extensions/api/content_settings/content_settings_api.cc b/chrome/browser/extensions/api/content_settings/content_settings_api.cc index 728e805..56631dd 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_api.cc +++ b/chrome/browser/extensions/api/content_settings/content_settings_api.cc @@ -266,11 +266,11 @@ bool ContentSettingsContentSettingGetResourceIdentifiersFunction::RunImpl() { } void ContentSettingsContentSettingGetResourceIdentifiersFunction::OnGotPlugins( - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { PluginFinder* finder = PluginFinder::GetInstance(); std::set<std::string> group_identifiers; base::ListValue* list = new base::ListValue(); - for (std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin(); + for (std::vector<content::WebPluginInfo>::const_iterator it = plugins.begin(); it != plugins.end(); ++it) { scoped_ptr<PluginMetadata> plugin_metadata(finder->GetPluginMetadata(*it)); const std::string& group_identifier = plugin_metadata->identifier(); diff --git a/chrome/browser/extensions/api/content_settings/content_settings_api.h b/chrome/browser/extensions/api/content_settings/content_settings_api.h index fcdd01f..820849f 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_api.h +++ b/chrome/browser/extensions/api/content_settings/content_settings_api.h @@ -9,7 +9,7 @@ class PluginFinder; -namespace webkit { +namespace content { struct WebPluginInfo; } @@ -67,7 +67,7 @@ class ContentSettingsContentSettingGetResourceIdentifiersFunction // Callback method that gets executed when |plugins| // are asynchronously fetched. - void OnGotPlugins(const std::vector<webkit::WebPluginInfo>& plugins); + void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins); }; } // namespace extensions diff --git a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc index f1702cc..8c3bbed 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc +++ b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc @@ -13,7 +13,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/pref_names.h" #include "content/public/browser/plugin_service.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" namespace extensions { @@ -115,16 +115,16 @@ IN_PROC_BROWSER_TEST_F(ContentSettingsGetResourceIdentifiersTest, const char* kBarName = "Bar Plugin"; content::PluginService::GetInstance()->RegisterInternalPlugin( - webkit::WebPluginInfo(ASCIIToUTF16(kFooName), - base::FilePath(kFooPath), - ASCIIToUTF16("1.2.3"), - ASCIIToUTF16("foo")), + content::WebPluginInfo(ASCIIToUTF16(kFooName), + base::FilePath(kFooPath), + ASCIIToUTF16("1.2.3"), + ASCIIToUTF16("foo")), false); content::PluginService::GetInstance()->RegisterInternalPlugin( - webkit::WebPluginInfo(ASCIIToUTF16(kBarName), - base::FilePath(kBarPath), - ASCIIToUTF16("2.3.4"), - ASCIIToUTF16("bar")), + content::WebPluginInfo(ASCIIToUTF16(kBarName), + base::FilePath(kBarPath), + ASCIIToUTF16("2.3.4"), + ASCIIToUTF16("bar")), false); EXPECT_TRUE(RunExtensionTest("content_settings/getresourceidentifiers")) diff --git a/chrome/browser/extensions/extension_nacl_browsertest.cc b/chrome/browser/extensions/extension_nacl_browsertest.cc index 160c9f8..df151de 100644 --- a/chrome/browser/extensions/extension_nacl_browsertest.cc +++ b/chrome/browser/extensions/extension_nacl_browsertest.cc @@ -20,9 +20,9 @@ #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/plugin_service.h" #include "content/public/browser/web_contents.h" +#include "content/public/common/webplugininfo.h" #include "content/public/test/browser_test_utils.h" #include "net/dns/mock_host_resolver.h" -#include "webkit/plugins/webplugininfo.h" using content::PluginService; using content::WebContents; @@ -107,7 +107,7 @@ class NaClExtensionTest : public ExtensionBrowserTest { bool IsNaClPluginLoaded() { base::FilePath path; if (PathService::Get(chrome::FILE_NACL_PLUGIN, &path)) { - webkit::WebPluginInfo info; + content::WebPluginInfo info; return PluginService::GetInstance()->GetPluginInfoByPath(path, &info); } return false; diff --git a/chrome/browser/extensions/plugin_manager.cc b/chrome/browser/extensions/plugin_manager.cc index f797cda..ff77620 100644 --- a/chrome/browser/extensions/plugin_manager.cc +++ b/chrome/browser/extensions/plugin_manager.cc @@ -148,7 +148,7 @@ void PluginManager::UpdatePluginListWithNaClModules() { if (!pepper_info) return; - std::vector<webkit::WebPluginMimeType>::const_iterator mime_iter; + std::vector<content::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) { @@ -157,7 +157,7 @@ void PluginManager::UpdatePluginListWithNaClModules() { PluginService::GetInstance()->UnregisterInternalPlugin(pepper_info->path); - webkit::WebPluginInfo info = pepper_info->ToWebPluginInfo(); + content::WebPluginInfo info = pepper_info->ToWebPluginInfo(); for (NaClModuleInfo::List::const_iterator iter = nacl_module_list_.begin(); @@ -165,7 +165,7 @@ void PluginManager::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::WebPluginMimeType mime_type_info; + content::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/hang_monitor/hung_plugin_action.cc b/chrome/browser/hang_monitor/hung_plugin_action.cc index 3aebbb2..cdb9e59 100644 --- a/chrome/browser/hang_monitor/hung_plugin_action.cc +++ b/chrome/browser/hang_monitor/hung_plugin_action.cc @@ -11,10 +11,10 @@ #include "chrome/browser/ui/simple_message_box.h" #include "chrome/common/logging_chrome.h" #include "content/public/browser/plugin_service.h" +#include "content/public/common/webplugininfo.h" #include "grit/generated_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/win/hwnd_util.h" -#include "webkit/plugins/webplugininfo.h" namespace { @@ -41,7 +41,7 @@ enum GTalkPluginLogVersion { GTalkPluginLogVersion GetGTalkPluginVersion(const string16& version) { int gtalk_plugin_version = GTALK_PLUGIN_VERSION_MIN; Version plugin_version; - webkit::WebPluginInfo::CreateVersionFromString(version, &plugin_version); + content::WebPluginInfo::CreateVersionFromString(version, &plugin_version); if (plugin_version.IsValid() && plugin_version.components().size() >= 2) { gtalk_plugin_version = 10 * plugin_version.components()[0] + plugin_version.components()[1] - kGTalkPluginLogMinVersion; diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc index 0e6a23a..af2613f 100644 --- a/chrome/browser/metrics/metrics_log.cc +++ b/chrome/browser/metrics/metrics_log.cc @@ -44,13 +44,13 @@ #include "components/nacl/common/nacl_process_type.h" #include "content/public/browser/gpu_data_manager.h" #include "content/public/common/content_client.h" +#include "content/public/common/webplugininfo.h" #include "device/bluetooth/bluetooth_adapter.h" #include "device/bluetooth/bluetooth_adapter_factory.h" #include "device/bluetooth/bluetooth_device.h" #include "gpu/config/gpu_info.h" #include "ui/gfx/screen.h" #include "url/gurl.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_ANDROID) #include "base/android/build_info.h" @@ -193,7 +193,7 @@ PluginPrefs* GetPluginPrefs() { } // Fills |plugin| with the info contained in |plugin_info| and |plugin_prefs|. -void SetPluginInfo(const webkit::WebPluginInfo& plugin_info, +void SetPluginInfo(const content::WebPluginInfo& plugin_info, const PluginPrefs* plugin_prefs, SystemProfileProto::Plugin* plugin) { plugin->set_name(UTF16ToUTF8(plugin_info.name)); @@ -405,7 +405,7 @@ const std::string& MetricsLog::version_extension() { } void MetricsLog::RecordIncrementalStabilityElements( - const std::vector<webkit::WebPluginInfo>& plugin_list) { + const std::vector<content::WebPluginInfo>& plugin_list) { DCHECK(!locked()); PrefService* pref = GetPrefService(); @@ -440,7 +440,7 @@ void MetricsLog::GetFieldTrialIds( } void MetricsLog::WriteStabilityElement( - const std::vector<webkit::WebPluginInfo>& plugin_list, + const std::vector<content::WebPluginInfo>& plugin_list, PrefService* pref) { DCHECK(!locked()); @@ -483,7 +483,7 @@ void MetricsLog::WriteStabilityElement( } void MetricsLog::WritePluginStabilityElements( - const std::vector<webkit::WebPluginInfo>& plugin_list, + const std::vector<content::WebPluginInfo>& plugin_list, PrefService* pref) { // Now log plugin stability info. const ListValue* plugin_stats_list = pref->GetList( @@ -509,11 +509,11 @@ void MetricsLog::WritePluginStabilityElements( // fine. // TODO(isherman): Verify that this does not show up as a hotspot in // profiler runs. - const webkit::WebPluginInfo* plugin_info = NULL; + const content::WebPluginInfo* plugin_info = NULL; std::string plugin_name; plugin_dict->GetString(prefs::kStabilityPluginName, &plugin_name); const string16 plugin_name_utf16 = UTF8ToUTF16(plugin_name); - for (std::vector<webkit::WebPluginInfo>::const_iterator iter = + for (std::vector<content::WebPluginInfo>::const_iterator iter = plugin_list.begin(); iter != plugin_list.end(); ++iter) { if (iter->name == plugin_name_utf16) { @@ -637,13 +637,13 @@ void MetricsLog::WriteRealtimeStabilityAttributes(PrefService* pref) { } void MetricsLog::WritePluginList( - const std::vector<webkit::WebPluginInfo>& plugin_list) { + const std::vector<content::WebPluginInfo>& plugin_list) { DCHECK(!locked()); #if defined(ENABLE_PLUGINS) PluginPrefs* plugin_prefs = GetPluginPrefs(); SystemProfileProto* system_profile = uma_proto()->mutable_system_profile(); - for (std::vector<webkit::WebPluginInfo>::const_iterator iter = + for (std::vector<content::WebPluginInfo>::const_iterator iter = plugin_list.begin(); iter != plugin_list.end(); ++iter) { SystemProfileProto::Plugin* plugin = system_profile->add_plugin(); @@ -653,7 +653,7 @@ void MetricsLog::WritePluginList( } void MetricsLog::RecordEnvironment( - const std::vector<webkit::WebPluginInfo>& plugin_list, + const std::vector<content::WebPluginInfo>& plugin_list, const GoogleUpdateMetrics& google_update_metrics) { DCHECK(!locked()); @@ -664,7 +664,7 @@ void MetricsLog::RecordEnvironment( } void MetricsLog::RecordEnvironmentProto( - const std::vector<webkit::WebPluginInfo>& plugin_list, + const std::vector<content::WebPluginInfo>& plugin_list, const GoogleUpdateMetrics& google_update_metrics) { SystemProfileProto* system_profile = uma_proto()->mutable_system_profile(); diff --git a/chrome/browser/metrics/metrics_log.h b/chrome/browser/metrics/metrics_log.h index abc0847..fe06b61 100644 --- a/chrome/browser/metrics/metrics_log.h +++ b/chrome/browser/metrics/metrics_log.h @@ -30,6 +30,10 @@ namespace base { class DictionaryValue; } +namespace content { +struct WebPluginInfo; +} + namespace device { class BluetoothAdapter; } @@ -42,10 +46,6 @@ namespace chrome_variations { struct ActiveGroupId; } -namespace webkit { -struct WebPluginInfo; -} - // This is a small helper struct to pass Google Update metrics in a single // reference argument to MetricsLog::RecordEnvironment(). struct GoogleUpdateMetrics { @@ -94,7 +94,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::WebPluginInfo>& plugin_list, + const std::vector<content::WebPluginInfo>& plugin_list, const GoogleUpdateMetrics& google_update_metrics); // Records the current operating environment. Takes the list of installed @@ -104,7 +104,7 @@ class MetricsLog : public MetricsLogBase { // environment with *each* protobuf upload, but only with the initial XML // upload. void RecordEnvironmentProto( - const std::vector<webkit::WebPluginInfo>& plugin_list, + const std::vector<content::WebPluginInfo>& plugin_list, const GoogleUpdateMetrics& google_update_metrics); // Records the input text, available choices, and selected entry when the @@ -124,7 +124,7 @@ class MetricsLog : public MetricsLogBase { // installed plugins as a parameter because that can't be obtained // synchronously from the UI thread. void RecordIncrementalStabilityElements( - const std::vector<webkit::WebPluginInfo>& plugin_list); + const std::vector<content::WebPluginInfo>& plugin_list); protected: // Exposed for the sake of mocking in test code. @@ -152,12 +152,12 @@ class MetricsLog : public MetricsLogBase { // Writes application stability metrics (as part of the profile log). // NOTE: Has the side-effect of clearing those counts. void WriteStabilityElement( - const std::vector<webkit::WebPluginInfo>& plugin_list, + const std::vector<content::WebPluginInfo>& plugin_list, PrefService* pref); // Within stability group, write plugin crash stats. void WritePluginStabilityElements( - const std::vector<webkit::WebPluginInfo>& plugin_list, + const std::vector<content::WebPluginInfo>& plugin_list, PrefService* pref); // Within the stability group, write required attributes. @@ -170,7 +170,7 @@ class MetricsLog : public MetricsLogBase { void WriteRealtimeStabilityAttributes(PrefService* pref); // Writes the list of installed plugins. - void WritePluginList(const std::vector<webkit::WebPluginInfo>& plugin_list); + void WritePluginList(const std::vector<content::WebPluginInfo>& plugin_list); // Writes info about the Google Update install that is managing this client. // This is a no-op if called on a non-Windows platform. diff --git a/chrome/browser/metrics/metrics_log_unittest.cc b/chrome/browser/metrics/metrics_log_unittest.cc index fe9c498..f102a86 100644 --- a/chrome/browser/metrics/metrics_log_unittest.cc +++ b/chrome/browser/metrics/metrics_log_unittest.cc @@ -25,11 +25,11 @@ #include "chrome/installer/util/google_update_settings.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/process_type.h" +#include "content/public/common/webplugininfo.h" #include "content/public/test/test_utils.h" #include "testing/gtest/include/gtest/gtest.h" #include "ui/gfx/size.h" #include "url/gurl.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_CHROMEOS) #include "chromeos/dbus/mock_dbus_thread_manager_without_gmock.h" @@ -128,7 +128,7 @@ class MetricsLogTest : public testing::Test { void TestRecordEnvironment(bool proto_only) { TestMetricsLog log(kClientId, kSessionId); - std::vector<webkit::WebPluginInfo> plugins; + std::vector<content::WebPluginInfo> plugins; GoogleUpdateMetrics google_update_metrics; if (proto_only) log.RecordEnvironmentProto(plugins, google_update_metrics); diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc index af6e5e2..d48eb7b 100644 --- a/chrome/browser/metrics/metrics_service.cc +++ b/chrome/browser/metrics/metrics_service.cc @@ -208,9 +208,9 @@ #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" #include "content/public/common/process_type.h" +#include "content/public/common/webplugininfo.h" #include "net/base/load_flags.h" #include "net/url_request/url_fetcher.h" -#include "webkit/plugins/webplugininfo.h" // TODO(port): port browser_distribution.h. #if !defined(OS_POSIX) @@ -909,13 +909,13 @@ void MetricsService::OnInitTaskGotHardwareClass( base::Bind(&MetricsService::OnInitTaskGotPluginInfo, self_ptr_factory_.GetWeakPtr())); #else - std::vector<webkit::WebPluginInfo> plugin_list_empty; + std::vector<content::WebPluginInfo> plugin_list_empty; OnInitTaskGotPluginInfo(plugin_list_empty); #endif // defined(ENABLE_PLUGINS) } void MetricsService::OnInitTaskGotPluginInfo( - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { DCHECK_EQ(INIT_TASK_SCHEDULED, state_); plugins_ = plugins; @@ -1595,7 +1595,7 @@ void MetricsService::LogChromeOSCrash(const std::string &crash_type) { #endif // OS_CHROMEOS void MetricsService::LogPluginLoadingError(const base::FilePath& plugin_path) { - webkit::WebPluginInfo plugin; + content::WebPluginInfo plugin; bool success = content::PluginService::GetInstance()->GetPluginInfoByPath(plugin_path, &plugin); diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h index d9e274b..b84172a 100644 --- a/chrome/browser/metrics/metrics_service.h +++ b/chrome/browser/metrics/metrics_service.h @@ -46,6 +46,7 @@ class MessageLoopProxy; namespace content { class RenderProcessHost; class WebContents; +struct WebPluginInfo; } namespace extensions { @@ -65,10 +66,6 @@ namespace tracked_objects { struct ProcessDataSnapshot; } -namespace webkit { -struct WebPluginInfo; -} - class MetricsService : public chrome_browser_metrics::TrackingSynchronizerObserver, public content::BrowserChildProcessObserver, @@ -236,7 +233,7 @@ class MetricsService // Callback from PluginService::GetPlugins() that continues the init task by // launching a task to gather Google Update statistics. void OnInitTaskGotPluginInfo( - const std::vector<webkit::WebPluginInfo>& plugins); + const std::vector<content::WebPluginInfo>& plugins); // Task launched by OnInitTaskGotPluginInfo() that continues the init task by // loading Google Update statistics. Called on a blocking pool thread. @@ -418,7 +415,7 @@ class MetricsService std::string hardware_class_; // The list of plugins which was retrieved on the file thread. - std::vector<webkit::WebPluginInfo> plugins_; + std::vector<content::WebPluginInfo> plugins_; // Google Update statistics, which were retrieved on a blocking pool thread. GoogleUpdateMetrics google_update_metrics_; diff --git a/chrome/browser/pepper_broker_infobar_delegate.cc b/chrome/browser/pepper_broker_infobar_delegate.cc index 66624ec..97d9240 100644 --- a/chrome/browser/pepper_broker_infobar_delegate.cc +++ b/chrome/browser/pepper_broker_infobar_delegate.cc @@ -17,11 +17,11 @@ #include "content/public/browser/user_metrics.h" #include "content/public/browser/web_contents.h" #include "content/public/common/referrer.h" +#include "content/public/common/webplugininfo.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "net/base/net_util.h" #include "ui/base/l10n/l10n_util.h" -#include "webkit/plugins/webplugininfo.h" #if defined(GOOGLE_TV) #include "base/android/context_types.h" @@ -139,7 +139,7 @@ int PepperBrokerInfoBarDelegate::GetIconID() const { string16 PepperBrokerInfoBarDelegate::GetMessageText() const { content::PluginService* plugin_service = content::PluginService::GetInstance(); - webkit::WebPluginInfo plugin; + content::WebPluginInfo plugin; bool success = plugin_service->GetPluginInfoByPath(plugin_path_, &plugin); DCHECK(success); scoped_ptr<PluginMetadata> plugin_metadata( diff --git a/chrome/browser/pepper_flash_settings_manager.cc b/chrome/browser/pepper_flash_settings_manager.cc index 17e0411..243ea84 100644 --- a/chrome/browser/pepper_flash_settings_manager.cc +++ b/chrome/browser/pepper_flash_settings_manager.cc @@ -24,12 +24,12 @@ #include "content/public/browser/pepper_flash_settings_helper.h" #include "content/public/browser/plugin_service.h" #include "content/public/common/content_constants.h" +#include "content/public/common/webplugininfo.h" #include "ipc/ipc_channel.h" #include "ipc/ipc_listener.h" #include "ppapi/proxy/ppapi_messages.h" #include "url/gurl.h" #include "webkit/plugins/plugin_constants.h" -#include "webkit/plugins/webplugininfo.h" using content::BrowserThread; @@ -401,7 +401,7 @@ void PepperFlashSettingsManager::Core::InitializeOnIOThread() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); DCHECK_EQ(STATE_UNINITIALIZED, state_); - webkit::WebPluginInfo plugin_info; + content::WebPluginInfo plugin_info; if (!PepperFlashSettingsManager::IsPepperFlashInUse(plugin_prefs_.get(), &plugin_info)) { NotifyErrorFromIOThread(); @@ -947,17 +947,17 @@ PepperFlashSettingsManager::~PepperFlashSettingsManager() { // static bool PepperFlashSettingsManager::IsPepperFlashInUse( PluginPrefs* plugin_prefs, - webkit::WebPluginInfo* plugin_info) { + content::WebPluginInfo* plugin_info) { if (!plugin_prefs) return false; content::PluginService* plugin_service = content::PluginService::GetInstance(); - std::vector<webkit::WebPluginInfo> plugins; + std::vector<content::WebPluginInfo> plugins; plugin_service->GetPluginInfoArray( GURL(), kFlashPluginSwfMimeType, false, &plugins, NULL); - for (std::vector<webkit::WebPluginInfo>::iterator iter = plugins.begin(); + for (std::vector<content::WebPluginInfo>::iterator iter = plugins.begin(); iter != plugins.end(); ++iter) { if (iter->is_pepper_plugin() && plugin_prefs->IsPluginEnabled(*iter)) { if (plugin_info) diff --git a/chrome/browser/pepper_flash_settings_manager.h b/chrome/browser/pepper_flash_settings_manager.h index cefb9c5..6aef457 100644 --- a/chrome/browser/pepper_flash_settings_manager.h +++ b/chrome/browser/pepper_flash_settings_manager.h @@ -16,16 +16,13 @@ class PrefService; namespace content { class BrowserContext; +struct WebPluginInfo; } namespace user_prefs { class PrefRegistrySyncable; } -namespace webkit { -struct WebPluginInfo; -} - // PepperFlashSettingsManager communicates with a PPAPI broker process to // read/write Pepper Flash settings. class PepperFlashSettingsManager { @@ -64,7 +61,7 @@ class PepperFlashSettingsManager { // |plugin_info| will be updated if it is not NULL and the method returns // true. static bool IsPepperFlashInUse(PluginPrefs* plugin_prefs, - webkit::WebPluginInfo* plugin_info); + content::WebPluginInfo* plugin_info); static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); diff --git a/chrome/browser/plugins/chrome_plugin_service_filter.cc b/chrome/browser/plugins/chrome_plugin_service_filter.cc index 633d758..c466380 100644 --- a/chrome/browser/plugins/chrome_plugin_service_filter.cc +++ b/chrome/browser/plugins/chrome_plugin_service_filter.cc @@ -42,7 +42,7 @@ void ChromePluginServiceFilter::OverridePluginForTab( int render_process_id, int render_view_id, const GURL& url, - const webkit::WebPluginInfo& plugin) { + const content::WebPluginInfo& plugin) { base::AutoLock auto_lock(lock_); ProcessDetails* details = GetOrRegisterProcess(render_process_id); OverriddenPlugin overridden_plugin; @@ -73,7 +73,7 @@ bool ChromePluginServiceFilter::IsPluginAvailable( const void* context, const GURL& url, const GURL& policy_url, - webkit::WebPluginInfo* plugin) { + content::WebPluginInfo* plugin) { base::AutoLock auto_lock(lock_); const ProcessDetails* details = GetProcess(render_process_id); diff --git a/chrome/browser/plugins/chrome_plugin_service_filter.h b/chrome/browser/plugins/chrome_plugin_service_filter.h index 5b61c3a..513b1ff 100644 --- a/chrome/browser/plugins/chrome_plugin_service_filter.h +++ b/chrome/browser/plugins/chrome_plugin_service_filter.h @@ -17,8 +17,8 @@ #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/plugin_service_filter.h" +#include "content/public/common/webplugininfo.h" #include "url/gurl.h" -#include "webkit/plugins/webplugininfo.h" class PluginPrefs; class Profile; @@ -40,7 +40,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter, void OverridePluginForTab(int render_process_id, int render_view_id, const GURL& url, - const webkit::WebPluginInfo& plugin); + const content::WebPluginInfo& plugin); // Restricts the given plugin to the given profile and origin of the given // URL. @@ -65,7 +65,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter, const void* context, const GURL& url, const GURL& policy_url, - webkit::WebPluginInfo* plugin) OVERRIDE; + content::WebPluginInfo* plugin) OVERRIDE; // CanLoadPlugin always grants permission to the browser // (render_process_id == 0) @@ -82,7 +82,7 @@ class ChromePluginServiceFilter : public content::PluginServiceFilter, int render_view_id; GURL url; // If empty, the override applies to all urls in render_view. - webkit::WebPluginInfo plugin; + content::WebPluginInfo plugin; }; struct ProcessDetails { diff --git a/chrome/browser/plugins/plugin_data_remover_helper.cc b/chrome/browser/plugins/plugin_data_remover_helper.cc index f9e19ae..0f7d6b7 100644 --- a/chrome/browser/plugins/plugin_data_remover_helper.cc +++ b/chrome/browser/plugins/plugin_data_remover_helper.cc @@ -6,13 +6,13 @@ #include "chrome/browser/plugins/plugin_prefs.h" #include "content/public/browser/plugin_data_remover.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" // static bool PluginDataRemoverHelper::IsSupported(PluginPrefs* plugin_prefs) { - std::vector<webkit::WebPluginInfo> plugins; + std::vector<content::WebPluginInfo> plugins; content::PluginDataRemover::GetSupportedPlugins(&plugins); - for (std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin(); + for (std::vector<content::WebPluginInfo>::const_iterator it = plugins.begin(); it != plugins.end(); ++it) { if (plugin_prefs->IsPluginEnabled(*it)) return true; diff --git a/chrome/browser/plugins/plugin_finder.cc b/chrome/browser/plugins/plugin_finder.cc index 5cf9378..9f7b799 100644 --- a/chrome/browser/plugins/plugin_finder.cc +++ b/chrome/browser/plugins/plugin_finder.cc @@ -34,18 +34,18 @@ namespace { typedef std::map<std::string, PluginMetadata*> PluginMap; // Gets the full path of the plug-in file as the identifier. -std::string GetLongIdentifier(const webkit::WebPluginInfo& plugin) { +std::string GetLongIdentifier(const content::WebPluginInfo& plugin) { return plugin.path.AsUTF8Unsafe(); } // Gets the base name of the file path as the identifier. -std::string GetIdentifier(const webkit::WebPluginInfo& plugin) { +std::string GetIdentifier(const content::WebPluginInfo& plugin) { return plugin.path.BaseName().AsUTF8Unsafe(); } // Gets the plug-in group name as the plug-in name if it is not empty or // the filename without extension if the name is empty. -static string16 GetGroupName(const webkit::WebPluginInfo& plugin) { +static string16 GetGroupName(const content::WebPluginInfo& plugin) { if (!plugin.name.empty()) return plugin.name; @@ -277,7 +277,7 @@ string16 PluginFinder::FindPluginNameWithIdentifier( } scoped_ptr<PluginMetadata> PluginFinder::GetPluginMetadata( - const webkit::WebPluginInfo& plugin) { + const content::WebPluginInfo& plugin) { base::AutoLock lock(mutex_); for (PluginMap::const_iterator it = identifier_plugin_.begin(); it != identifier_plugin_.end(); ++it) { diff --git a/chrome/browser/plugins/plugin_finder.h b/chrome/browser/plugins/plugin_finder.h index 25e1eee..d7f8cb0 100644 --- a/chrome/browser/plugins/plugin_finder.h +++ b/chrome/browser/plugins/plugin_finder.h @@ -14,7 +14,7 @@ #include "base/memory/singleton.h" #include "base/strings/string16.h" #include "base/synchronization/lock.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" namespace base { class DictionaryValue; @@ -65,7 +65,7 @@ class PluginFinder { // Gets plug-in metadata using |plugin|. scoped_ptr<PluginMetadata> GetPluginMetadata( - const webkit::WebPluginInfo& plugin); + const content::WebPluginInfo& plugin); private: friend struct DefaultSingletonTraits<PluginFinder>; diff --git a/chrome/browser/plugins/plugin_info_message_filter.cc b/chrome/browser/plugins/plugin_info_message_filter.cc index 399a01f..f2260e4 100644 --- a/chrome/browser/plugins/plugin_info_message_filter.cc +++ b/chrome/browser/plugins/plugin_info_message_filter.cc @@ -31,7 +31,7 @@ #endif using content::PluginService; -using webkit::WebPluginInfo; +using content::WebPluginInfo; namespace { diff --git a/chrome/browser/plugins/plugin_info_message_filter.h b/chrome/browser/plugins/plugin_info_message_filter.h index 9eaafe1..d57427e 100644 --- a/chrome/browser/plugins/plugin_info_message_filter.h +++ b/chrome/browser/plugins/plugin_info_message_filter.h @@ -25,9 +25,6 @@ class Profile; namespace content { class ResourceContext; -} - -namespace webkit { struct WebPluginInfo; } @@ -46,7 +43,7 @@ class PluginInfoMessageFilter : public content::BrowserMessageFilter { void DecidePluginStatus( const GetPluginInfo_Params& params, - const webkit::WebPluginInfo& plugin, + const content::WebPluginInfo& plugin, const PluginMetadata* plugin_metadata, ChromeViewHostMsg_GetPluginInfo_Status* status) const; bool FindEnabledPlugin(int render_view_id, @@ -54,10 +51,10 @@ class PluginInfoMessageFilter : public content::BrowserMessageFilter { const GURL& top_origin_url, const std::string& mime_type, ChromeViewHostMsg_GetPluginInfo_Status* status, - webkit::WebPluginInfo* plugin, + content::WebPluginInfo* plugin, std::string* actual_mime_type, scoped_ptr<PluginMetadata>* plugin_metadata) const; - void GetPluginContentSetting(const webkit::WebPluginInfo& plugin, + void GetPluginContentSetting(const content::WebPluginInfo& plugin, const GURL& policy_url, const GURL& plugin_url, const std::string& resource, @@ -99,7 +96,7 @@ class PluginInfoMessageFilter : public content::BrowserMessageFilter { // |base::Bind| doesn't support the required arity <http://crbug.com/98542>. void PluginsLoaded(const GetPluginInfo_Params& params, IPC::Message* reply_msg, - const std::vector<webkit::WebPluginInfo>& plugins); + const std::vector<content::WebPluginInfo>& plugins); Context context_; diff --git a/chrome/browser/plugins/plugin_installer.h b/chrome/browser/plugins/plugin_installer.h index 36a4261..978fe1a 100644 --- a/chrome/browser/plugins/plugin_installer.h +++ b/chrome/browser/plugins/plugin_installer.h @@ -18,9 +18,6 @@ class WeakPluginInstallerObserver; namespace content { class WebContents; -} - -namespace webkit { struct WebPluginInfo; } diff --git a/chrome/browser/plugins/plugin_installer_unittest.cc b/chrome/browser/plugins/plugin_installer_unittest.cc index 9fd2e41..bceecc4 100644 --- a/chrome/browser/plugins/plugin_installer_unittest.cc +++ b/chrome/browser/plugins/plugin_installer_unittest.cc @@ -5,19 +5,18 @@ #include "chrome/browser/plugins/plugin_installer.h" #include "base/strings/utf_string_conversions.h" +#include "content/public/common/webplugininfo.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/plugins/webplugininfo.h" - -using webkit::WebPluginInfo; namespace { PluginInstaller::SecurityStatus GetSecurityStatus(PluginInstaller* installer, const char* version) { - WebPluginInfo plugin(ASCIIToUTF16("Foo plug-in"), - base::FilePath(FILE_PATH_LITERAL("/tmp/plugin.so")), - ASCIIToUTF16(version), - ASCIIToUTF16("Foo plug-in.")); + content:: WebPluginInfo plugin( + ASCIIToUTF16("Foo plug-in"), + base::FilePath(FILE_PATH_LITERAL("/tmp/plugin.so")), + ASCIIToUTF16(version), + ASCIIToUTF16("Foo plug-in.")); return installer->GetSecurityStatus(plugin); } diff --git a/chrome/browser/plugins/plugin_metadata.cc b/chrome/browser/plugins/plugin_metadata.cc index 71c02f7..5f2fc50 100644 --- a/chrome/browser/plugins/plugin_metadata.cc +++ b/chrome/browser/plugins/plugin_metadata.cc @@ -8,7 +8,7 @@ #include "base/logging.h" #include "base/strings/string_util.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" // static const char PluginMetadata::kAdobeReaderGroupName[] = "Adobe Reader"; @@ -58,7 +58,7 @@ bool PluginMetadata::HasMimeType(const std::string& mime_type) const { all_mime_types_.end(); } -bool PluginMetadata::MatchesPlugin(const webkit::WebPluginInfo& plugin) { +bool PluginMetadata::MatchesPlugin(const content::WebPluginInfo& plugin) { for (size_t i = 0; i < matching_mime_types_.size(); ++i) { // To have a match, every one of the |matching_mime_types_| // must be handled by the plug-in. @@ -91,7 +91,7 @@ bool PluginMetadata::ParseSecurityStatus( } PluginMetadata::SecurityStatus PluginMetadata::GetSecurityStatus( - const webkit::WebPluginInfo& plugin) const { + const content::WebPluginInfo& plugin) const { if (versions_.empty()) { #if defined(OS_LINUX) // On Linux, unknown plugins require authorization. @@ -102,7 +102,7 @@ PluginMetadata::SecurityStatus PluginMetadata::GetSecurityStatus( } Version version; - webkit::WebPluginInfo::CreateVersionFromString(plugin.version, &version); + content::WebPluginInfo::CreateVersionFromString(plugin.version, &version); if (!version.IsValid()) version = Version("0"); diff --git a/chrome/browser/plugins/plugin_metadata.h b/chrome/browser/plugins/plugin_metadata.h index 69019a7..98d19250 100644 --- a/chrome/browser/plugins/plugin_metadata.h +++ b/chrome/browser/plugins/plugin_metadata.h @@ -12,7 +12,7 @@ #include "base/version.h" #include "url/gurl.h" -namespace webkit { +namespace content { struct WebPluginInfo; } @@ -72,7 +72,7 @@ class PluginMetadata { // Checks if |plugin| mime types match all |matching_mime_types_|. // If there is no |matching_mime_types_|, |group_name_matcher_| is used // for matching. - bool MatchesPlugin(const webkit::WebPluginInfo& plugin); + bool MatchesPlugin(const content::WebPluginInfo& plugin); // If |status_str| describes a valid security status, writes it to |status| // and returns true, else returns false and leaves |status| unchanged. @@ -81,7 +81,7 @@ class PluginMetadata { // Returns the security status for the given plug-in (i.e. whether it is // considered out-of-date, etc.) - SecurityStatus GetSecurityStatus(const webkit::WebPluginInfo& plugin) const; + SecurityStatus GetSecurityStatus(const content::WebPluginInfo& plugin) const; scoped_ptr<PluginMetadata> Clone() const; diff --git a/chrome/browser/plugins/plugin_metadata_unittest.cc b/chrome/browser/plugins/plugin_metadata_unittest.cc index 0ff692c..bb69ee7 100644 --- a/chrome/browser/plugins/plugin_metadata_unittest.cc +++ b/chrome/browser/plugins/plugin_metadata_unittest.cc @@ -5,20 +5,19 @@ #include "chrome/browser/plugins/plugin_metadata.h" #include "base/strings/utf_string_conversions.h" +#include "content/public/common/webplugininfo.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/plugins/webplugininfo.h" - -using webkit::WebPluginInfo; namespace { PluginMetadata::SecurityStatus GetSecurityStatus( PluginMetadata* plugin_metadata, const char* version) { - WebPluginInfo plugin(ASCIIToUTF16("Foo plug-in"), - base::FilePath(FILE_PATH_LITERAL("/tmp/plugin.so")), - ASCIIToUTF16(version), - ASCIIToUTF16("Foo plug-in.")); + content::WebPluginInfo plugin( + ASCIIToUTF16("Foo plug-in"), + base::FilePath(FILE_PATH_LITERAL("/tmp/plugin.so")), + ASCIIToUTF16(version), + ASCIIToUTF16("Foo plug-in.")); return plugin_metadata->GetSecurityStatus(plugin); } diff --git a/chrome/browser/plugins/plugin_observer.cc b/chrome/browser/plugins/plugin_observer.cc index f22b537..7c9cd67 100644 --- a/chrome/browser/plugins/plugin_observer.cc +++ b/chrome/browser/plugins/plugin_observer.cc @@ -29,10 +29,10 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_contents_view.h" +#include "content/public/common/webplugininfo.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "ui/base/l10n/l10n_util.h" -#include "webkit/plugins/webplugininfo.h" #if defined(ENABLE_PLUGIN_INSTALLATION) #if defined(OS_WIN) diff --git a/chrome/browser/plugins/plugin_prefs.cc b/chrome/browser/plugins/plugin_prefs.cc index 37841ca..a88e151 100644 --- a/chrome/browser/plugins/plugin_prefs.cc +++ b/chrome/browser/plugins/plugin_prefs.cc @@ -31,7 +31,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/plugin_service.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" using content::BrowserThread; using content::PluginService; @@ -110,7 +110,7 @@ void PluginPrefs::EnablePluginGroup(bool enabled, const string16& group_name) { void PluginPrefs::EnablePluginGroupInternal( bool enabled, const string16& group_name, - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { base::AutoLock auto_lock(lock_); PluginFinder* finder = PluginFinder::GetInstance(); @@ -135,7 +135,7 @@ void PluginPrefs::EnablePlugin( bool enabled, const base::FilePath& path, const base::Callback<void(bool)>& callback) { PluginFinder* finder = PluginFinder::GetInstance(); - webkit::WebPluginInfo plugin; + content::WebPluginInfo plugin; bool can_enable = true; if (PluginService::GetInstance()->GetPluginInfoByPath(path, &plugin)) { scoped_ptr<PluginMetadata> plugin_metadata( @@ -169,7 +169,7 @@ void PluginPrefs::EnablePluginInternal( const base::FilePath& path, PluginFinder* plugin_finder, const base::Callback<void(bool)>& callback, - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { { // Set the desired state for the plug-in. base::AutoLock auto_lock(lock_); @@ -225,7 +225,7 @@ PluginPrefs::PolicyStatus PluginPrefs::PolicyStatusForPlugin( } } -bool PluginPrefs::IsPluginEnabled(const webkit::WebPluginInfo& plugin) const { +bool PluginPrefs::IsPluginEnabled(const content::WebPluginInfo& plugin) const { scoped_ptr<PluginMetadata> plugin_metadata( PluginFinder::GetInstance()->GetPluginMetadata(plugin)); string16 group_name = plugin_metadata->name(); @@ -522,7 +522,7 @@ void PluginPrefs::SetPolicyEnforcedPluginPatterns( } void PluginPrefs::OnUpdatePreferences( - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { if (!prefs_) return; diff --git a/chrome/browser/plugins/plugin_prefs.h b/chrome/browser/plugins/plugin_prefs.h index fd0e403..bfcaa06 100644 --- a/chrome/browser/plugins/plugin_prefs.h +++ b/chrome/browser/plugins/plugin_prefs.h @@ -23,7 +23,7 @@ namespace base { class ListValue; } -namespace webkit { +namespace content { struct WebPluginInfo; } @@ -70,7 +70,7 @@ class PluginPrefs : public RefcountedBrowserContextKeyedService { PolicyStatus PolicyStatusForPlugin(const string16& name) const; // Returns whether the plugin is enabled or not. - bool IsPluginEnabled(const webkit::WebPluginInfo& plugin) const; + bool IsPluginEnabled(const content::WebPluginInfo& plugin) const; void set_profile(Profile* profile) { profile_ = profile; } @@ -117,16 +117,16 @@ class PluginPrefs : public RefcountedBrowserContextKeyedService { void EnablePluginGroupInternal( bool enabled, const string16& group_name, - const std::vector<webkit::WebPluginInfo>& plugins); + const std::vector<content::WebPluginInfo>& plugins); void EnablePluginInternal( bool enabled, const base::FilePath& path, PluginFinder* plugin_finder, const base::Callback<void(bool)>& callback, - const std::vector<webkit::WebPluginInfo>& plugins); + const std::vector<content::WebPluginInfo>& plugins); // Called on the UI thread with the plugin data to save the preferences. - void OnUpdatePreferences(const std::vector<webkit::WebPluginInfo>& plugins); + void OnUpdatePreferences(const std::vector<content::WebPluginInfo>& plugins); // Sends the notification that plugin data has changed. void NotifyPluginStatusChanged(); diff --git a/chrome/browser/plugins/plugin_prefs_unittest.cc b/chrome/browser/plugins/plugin_prefs_unittest.cc index 40d2558..53e148d 100644 --- a/chrome/browser/plugins/plugin_prefs_unittest.cc +++ b/chrome/browser/plugins/plugin_prefs_unittest.cc @@ -14,10 +14,10 @@ #include "chrome/common/chrome_paths.h" #include "content/public/browser/plugin_service.h" #include "content/public/browser/render_process_host.h" +#include "content/public/common/webplugininfo.h" #include "content/public/test/test_browser_thread.h" #include "content/public/test/test_utils.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/plugins/webplugininfo.h" using content::BrowserThread; using content::PluginService; @@ -48,7 +48,7 @@ base::FilePath GetBundledPepperFlashPath() { } void GotPlugins(const base::Closure& quit_closure, - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { quit_closure.Run(); } @@ -196,20 +196,20 @@ TEST_F(PluginPrefsTest, UnifiedPepperFlashState) { string16 component_updated_plugin_name( ASCIIToUTF16("Component-updated Pepper Flash")); - webkit::WebPluginInfo component_updated_plugin_1( + content::WebPluginInfo component_updated_plugin_1( component_updated_plugin_name, GetComponentUpdatedPepperFlashPath(FILE_PATH_LITERAL("11.3.31.227")), ASCIIToUTF16("11.3.31.227"), ASCIIToUTF16("")); - webkit::WebPluginInfo component_updated_plugin_2( + content::WebPluginInfo component_updated_plugin_2( component_updated_plugin_name, GetComponentUpdatedPepperFlashPath(FILE_PATH_LITERAL("11.3.31.228")), ASCIIToUTF16("11.3.31.228"), ASCIIToUTF16("")); - webkit::WebPluginInfo bundled_plugin(ASCIIToUTF16("Pepper Flash"), - GetBundledPepperFlashPath(), - ASCIIToUTF16("11.3.31.229"), - ASCIIToUTF16("")); + content::WebPluginInfo bundled_plugin(ASCIIToUTF16("Pepper Flash"), + GetBundledPepperFlashPath(), + ASCIIToUTF16("11.3.31.229"), + ASCIIToUTF16("")); PluginService::GetInstance()->RegisterInternalPlugin( component_updated_plugin_1, false); diff --git a/chrome/browser/plugins/plugin_status_pref_setter.cc b/chrome/browser/plugins/plugin_status_pref_setter.cc index 09bf546..f2b4e7f 100644 --- a/chrome/browser/plugins/plugin_status_pref_setter.cc +++ b/chrome/browser/plugins/plugin_status_pref_setter.cc @@ -15,7 +15,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_source.h" #include "content/public/browser/plugin_service.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" using content::BrowserThread; using content::PluginService; @@ -59,7 +59,7 @@ void PluginStatusPrefSetter::StartUpdate() { void PluginStatusPrefSetter::GotPlugins( scoped_refptr<PluginPrefs> plugin_prefs, - const std::vector<webkit::WebPluginInfo>& /* plugins */) { + const std::vector<content::WebPluginInfo>& plugins) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); // Set the values on the PrefService instead of through the PrefMembers to // notify observers if they changed. diff --git a/chrome/browser/plugins/plugin_status_pref_setter.h b/chrome/browser/plugins/plugin_status_pref_setter.h index 034b74a..e77c94a 100644 --- a/chrome/browser/plugins/plugin_status_pref_setter.h +++ b/chrome/browser/plugins/plugin_status_pref_setter.h @@ -17,7 +17,7 @@ class PluginPrefs; class PrefService; class Profile; -namespace webkit { +namespace content { struct WebPluginInfo; } @@ -53,7 +53,7 @@ class PluginStatusPrefSetter : public content::NotificationObserver { private: void StartUpdate(); void GotPlugins(scoped_refptr<PluginPrefs> plugin_prefs, - const std::vector<webkit::WebPluginInfo>& plugins); + const std::vector<content::WebPluginInfo>& plugins); content::NotificationRegistrar registrar_; // Weak pointer. diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index 33e5b12..af7564f 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc @@ -95,6 +95,7 @@ #include "content/public/common/page_transition_types.h" #include "content/public/common/process_type.h" #include "content/public/common/url_constants.h" +#include "content/public/common/webplugininfo.h" #include "content/public/test/browser_test_utils.h" #include "content/public/test/download_test_observer.h" #include "content/public/test/mock_notification_observer.h" @@ -117,7 +118,6 @@ #include "ui/base/resource/resource_bundle.h" #include "url/gurl.h" #include "webkit/plugins/plugin_constants.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_CHROMEOS) #include "ash/accelerators/accelerator_controller.h" @@ -334,8 +334,8 @@ bool IsJavascriptEnabled(content::WebContents* contents) { return result == 123; } -void CopyPluginListAndQuit(std::vector<webkit::WebPluginInfo>* out, - const std::vector<webkit::WebPluginInfo>& in) { +void CopyPluginListAndQuit(std::vector<content::WebPluginInfo>* out, + const std::vector<content::WebPluginInfo>& in) { *out = in; base::MessageLoop::current()->QuitWhenIdle(); } @@ -346,15 +346,15 @@ void CopyValueAndQuit(T* out, T in) { base::MessageLoop::current()->QuitWhenIdle(); } -void GetPluginList(std::vector<webkit::WebPluginInfo>* plugins) { +void GetPluginList(std::vector<content::WebPluginInfo>* plugins) { content::PluginService* service = content::PluginService::GetInstance(); service->GetPlugins(base::Bind(CopyPluginListAndQuit, plugins)); content::RunMessageLoop(); } -const webkit::WebPluginInfo* GetFlashPlugin( - const std::vector<webkit::WebPluginInfo>& plugins) { - const webkit::WebPluginInfo* flash = NULL; +const content::WebPluginInfo* GetFlashPlugin( + const std::vector<content::WebPluginInfo>& plugins) { + const content::WebPluginInfo* flash = NULL; for (size_t i = 0; i < plugins.size(); ++i) { if (plugins[i].name == ASCIIToUTF16(kFlashPluginName)) { flash = &plugins[i]; @@ -372,7 +372,7 @@ const webkit::WebPluginInfo* GetFlashPlugin( } bool SetPluginEnabled(PluginPrefs* plugin_prefs, - const webkit::WebPluginInfo* plugin, + const content::WebPluginInfo* plugin, bool enabled) { bool ok = false; plugin_prefs->EnablePlugin(enabled, plugin->path, @@ -1020,9 +1020,9 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DisabledPlugins) { // Verify that the Flash plugin exists and that it can be enabled and disabled // by the user. - std::vector<webkit::WebPluginInfo> plugins; + std::vector<content::WebPluginInfo> plugins; GetPluginList(&plugins); - const webkit::WebPluginInfo* flash = GetFlashPlugin(plugins); + const content::WebPluginInfo* flash = GetFlashPlugin(plugins); if (!flash) return; PluginPrefs* plugin_prefs = @@ -1051,9 +1051,9 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DisabledPluginsExceptions) { // Verify that the Flash plugin exists and that it can be enabled and disabled // by the user. - std::vector<webkit::WebPluginInfo> plugins; + std::vector<content::WebPluginInfo> plugins; GetPluginList(&plugins); - const webkit::WebPluginInfo* flash = GetFlashPlugin(plugins); + const content::WebPluginInfo* flash = GetFlashPlugin(plugins); if (!flash) return; PluginPrefs* plugin_prefs = @@ -1090,9 +1090,9 @@ IN_PROC_BROWSER_TEST_F(PolicyTest, DisabledPluginsExceptions) { IN_PROC_BROWSER_TEST_F(PolicyTest, EnabledPlugins) { // Verifies that a plugin can be force-installed with a policy. - std::vector<webkit::WebPluginInfo> plugins; + std::vector<content::WebPluginInfo> plugins; GetPluginList(&plugins); - const webkit::WebPluginInfo* flash = GetFlashPlugin(plugins); + const content::WebPluginInfo* flash = GetFlashPlugin(plugins); if (!flash) return; PluginPrefs* plugin_prefs = diff --git a/chrome/browser/printing/print_preview_dialog_controller.cc b/chrome/browser/printing/print_preview_dialog_controller.cc index 89ec8fc..6d96eb3 100644 --- a/chrome/browser/printing/print_preview_dialog_controller.cc +++ b/chrome/browser/printing/print_preview_dialog_controller.cc @@ -40,9 +40,9 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/browser/web_contents_view.h" +#include "content/public/common/webplugininfo.h" #include "ui/web_dialogs/web_dialog_delegate.h" #include "ui/web_dialogs/web_dialog_web_contents_delegate.h" -#include "webkit/plugins/webplugininfo.h" using content::NativeWebKeyboardEvent; using content::NavigationController; @@ -59,7 +59,7 @@ void EnableInternalPDFPluginForContents(WebContents* preview_dialog) { if (!PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_plugin_path)) return; - webkit::WebPluginInfo pdf_plugin; + content::WebPluginInfo pdf_plugin; if (!content::PluginService::GetInstance()->GetPluginInfoByPath( pdf_plugin_path, &pdf_plugin)) return; diff --git a/chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc b/chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc index f352fa6..cca278a 100644 --- a/chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc +++ b/chrome/browser/renderer_host/plugin_info_message_filter_unittest.cc @@ -35,7 +35,7 @@ class FakePluginServiceFilter : public content::PluginServiceFilter { const void* context, const GURL& url, const GURL& policy_url, - webkit::WebPluginInfo* plugin) OVERRIDE; + content::WebPluginInfo* plugin) OVERRIDE; virtual bool CanLoadPlugin(int render_process_id, const base::FilePath& path) OVERRIDE; @@ -53,7 +53,7 @@ bool FakePluginServiceFilter::IsPluginAvailable(int render_process_id, const void* context, const GURL& url, const GURL& policy_url, - webkit::WebPluginInfo* plugin) { + content::WebPluginInfo* plugin) { std::map<base::FilePath, bool>::iterator it = plugin_state_.find(plugin->path); if (it == plugin_state_.end()) { @@ -79,22 +79,22 @@ class PluginInfoMessageFilterTest : public ::testing::Test { } virtual void SetUp() OVERRIDE { - webkit::WebPluginInfo foo_plugin(ASCIIToUTF16("Foo Plug-in"), - foo_plugin_path_, - ASCIIToUTF16("1"), - ASCIIToUTF16("The Foo plug-in.")); - webkit::WebPluginMimeType mimeType; - mimeType.mime_type = "foo/bar"; - foo_plugin.mime_types.push_back(mimeType); + content::WebPluginInfo foo_plugin(ASCIIToUTF16("Foo Plug-in"), + foo_plugin_path_, + ASCIIToUTF16("1"), + ASCIIToUTF16("The Foo plug-in.")); + content::WebPluginMimeType mime_type; + mime_type.mime_type = "foo/bar"; + foo_plugin.mime_types.push_back(mime_type); PluginService::GetInstance()->Init(); PluginService::GetInstance()->RegisterInternalPlugin(foo_plugin, false); - webkit::WebPluginInfo bar_plugin(ASCIIToUTF16("Bar Plug-in"), - bar_plugin_path_, - ASCIIToUTF16("1"), - ASCIIToUTF16("The Bar plug-in.")); - mimeType.mime_type = "foo/bar"; - bar_plugin.mime_types.push_back(mimeType); + content::WebPluginInfo bar_plugin(ASCIIToUTF16("Bar Plug-in"), + bar_plugin_path_, + ASCIIToUTF16("1"), + ASCIIToUTF16("The Bar plug-in.")); + mime_type.mime_type = "foo/bar"; + bar_plugin.mime_types.push_back(mime_type); PluginService::GetInstance()->RegisterInternalPlugin(bar_plugin, false); PluginService::GetInstance()->SetFilter(&filter_); @@ -120,7 +120,7 @@ class PluginInfoMessageFilterTest : public ::testing::Test { PluginInfoMessageFilter::Context context_; private: - void PluginsLoaded(const std::vector<webkit::WebPluginInfo>& plugins) { + void PluginsLoaded(const std::vector<content::WebPluginInfo>& plugins) { base::MessageLoop::current()->Quit(); } @@ -136,7 +136,7 @@ TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) { filter_.set_plugin_enabled(bar_plugin_path_, true); { ChromeViewHostMsg_GetPluginInfo_Status status; - webkit::WebPluginInfo plugin; + content::WebPluginInfo plugin; std::string actual_mime_type; EXPECT_TRUE(context_.FindEnabledPlugin( 0, GURL(), GURL(), "foo/bar", &status, &plugin, &actual_mime_type, @@ -148,7 +148,7 @@ TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) { filter_.set_plugin_enabled(foo_plugin_path_, false); { ChromeViewHostMsg_GetPluginInfo_Status status; - webkit::WebPluginInfo plugin; + content::WebPluginInfo plugin; std::string actual_mime_type; EXPECT_TRUE(context_.FindEnabledPlugin( 0, GURL(), GURL(), "foo/bar", &status, &plugin, &actual_mime_type, @@ -160,7 +160,7 @@ TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) { filter_.set_plugin_enabled(bar_plugin_path_, false); { ChromeViewHostMsg_GetPluginInfo_Status status; - webkit::WebPluginInfo plugin; + content::WebPluginInfo plugin; std::string actual_mime_type; std::string identifier; string16 plugin_name; @@ -172,7 +172,7 @@ TEST_F(PluginInfoMessageFilterTest, FindEnabledPlugin) { } { ChromeViewHostMsg_GetPluginInfo_Status status; - webkit::WebPluginInfo plugin; + content::WebPluginInfo plugin; std::string actual_mime_type; EXPECT_FALSE(context_.FindEnabledPlugin( 0, GURL(), GURL(), "baz/blurp", &status, &plugin, &actual_mime_type, diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc index f792db7..31374d5 100644 --- a/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc @@ -170,6 +170,7 @@ #include "content/public/common/content_switches.h" #include "content/public/common/page_zoom.h" #include "content/public/common/renderer_preferences.h" +#include "content/public/common/webplugininfo.h" #include "extensions/common/constants.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" @@ -183,7 +184,6 @@ #include "ui/base/window_open_disposition.h" #include "ui/gfx/point.h" #include "ui/shell_dialogs/selected_file_info.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_WIN) #include "base/win/metro.h" diff --git a/chrome/browser/ui/cocoa/drag_util.mm b/chrome/browser/ui/cocoa/drag_util.mm index b991fec..2f5d596 100644 --- a/chrome/browser/ui/cocoa/drag_util.mm +++ b/chrome/browser/ui/cocoa/drag_util.mm @@ -8,13 +8,13 @@ #include "chrome/browser/profiles/profile.h" #include "content/public/browser/plugin_service.h" #include "content/public/common/url_constants.h" +#include "content/public/common/webplugininfo.h" #include "ipc/ipc_message.h" #include "net/base/mime_util.h" #include "net/base/net_util.h" #import "third_party/mozilla/NSPasteboard+Utils.h" #import "ui/base/dragdrop/cocoa_dnd_util.h" #include "url/gurl.h" -#include "webkit/plugins/webplugininfo.h" using content::PluginService; @@ -39,7 +39,7 @@ BOOL IsSupportedFileURL(Profile* profile, const GURL& url) { // TODO(bauerb): This possibly uses stale information, but it's guaranteed not // to do disk access. bool allow_wildcard = false; - webkit::WebPluginInfo plugin; + content::WebPluginInfo plugin; return PluginService::GetInstance()->GetPluginInfo( -1, // process ID MSG_ROUTING_NONE, // routing ID diff --git a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc index d6c9638..fde1364 100644 --- a/chrome/browser/ui/pdf/pdf_unsupported_feature.cc +++ b/chrome/browser/ui/pdf/pdf_unsupported_feature.cc @@ -50,7 +50,7 @@ using content::PluginService; using content::Referrer; using content::UserMetricsAction; using content::WebContents; -using webkit::WebPluginInfo; +using content::WebPluginInfo; namespace { @@ -243,7 +243,7 @@ class PDFUnsupportedFeaturePromptDelegate public: // |reader| is NULL if Adobe Reader isn't installed. PDFUnsupportedFeaturePromptDelegate(WebContents* web_contents, - const webkit::WebPluginInfo* reader, + const content::WebPluginInfo* reader, PluginFinder* plugin_finder); virtual ~PDFUnsupportedFeaturePromptDelegate(); @@ -267,7 +267,7 @@ class PDFUnsupportedFeaturePromptDelegate PDFUnsupportedFeaturePromptDelegate::PDFUnsupportedFeaturePromptDelegate( WebContents* web_contents, - const webkit::WebPluginInfo* reader, + const content::WebPluginInfo* reader, PluginFinder* plugin_finder) : web_contents_(web_contents), reader_installed_(!!reader), @@ -358,13 +358,13 @@ void PDFUnsupportedFeaturePromptDelegate::Cancel() { #if defined(OS_WIN) && defined(ENABLE_PLUGIN_INSTALLATION) void GotPluginsCallback(int process_id, int routing_id, - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { WebContents* web_contents = tab_util::GetWebContentsByID(process_id, routing_id); if (!web_contents) return; - const webkit::WebPluginInfo* reader = NULL; + const content::WebPluginInfo* reader = NULL; PluginFinder* plugin_finder = PluginFinder::GetInstance(); for (size_t i = 0; i < plugins.size(); ++i) { scoped_ptr<PluginMetadata> plugin_metadata( diff --git a/chrome/browser/ui/webui/flash_ui.cc b/chrome/browser/ui/webui/flash_ui.cc index 84a5eba..52b70e3 100644 --- a/chrome/browser/ui/webui/flash_ui.cc +++ b/chrome/browser/ui/webui/flash_ui.cc @@ -33,6 +33,7 @@ #include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui_data_source.h" #include "content/public/browser/web_ui_message_handler.h" +#include "content/public/common/webplugininfo.h" #include "gpu/config/gpu_info.h" #include "grit/browser_resources.h" #include "grit/chromium_strings.h" @@ -41,7 +42,6 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "webkit/plugins/plugin_constants.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_WIN) #include "base/win/windows_version.h" @@ -99,7 +99,7 @@ class FlashDOMHandler : public WebUIMessageHandler, void HandleRequestFlashInfo(const ListValue* args); // Callback for the Flash plugin information. - void OnGotPlugins(const std::vector<webkit::WebPluginInfo>& plugins); + void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins); private: // Called when we think we might have enough information to return data back @@ -203,7 +203,7 @@ void FlashDOMHandler::OnGpuInfoUpdate() { } void FlashDOMHandler::OnGotPlugins( - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { has_plugin_info_ = true; MaybeRespondToPage(); } @@ -266,7 +266,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::WebPluginInfo> info_array; + std::vector<content::WebPluginInfo> info_array; PluginService::GetInstance()->GetPluginInfoArray( GURL(), kFlashPluginSwfMimeType, false, &info_array, NULL); if (info_array.empty()) { diff --git a/chrome/browser/ui/webui/nacl_ui.cc b/chrome/browser/ui/webui/nacl_ui.cc index 744d9cf..ed94181 100644 --- a/chrome/browser/ui/webui/nacl_ui.cc +++ b/chrome/browser/ui/webui/nacl_ui.cc @@ -28,13 +28,13 @@ #include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui_data_source.h" #include "content/public/browser/web_ui_message_handler.h" +#include "content/public/common/webplugininfo.h" #include "grit/browser_resources.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_WIN) #include "base/win/windows_version.h" @@ -109,7 +109,7 @@ class NaClDomHandler : public WebUIMessageHandler { void HandleRequestNaClInfo(const ListValue* args); // Callback for the NaCl plugin information. - void OnGotPlugins(const std::vector<webkit::WebPluginInfo>& plugins); + void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins); // A helper callback that receives the result of checking if PNaCl path // exists. |is_valid| is true if the PNaCl path that was returned by @@ -236,7 +236,7 @@ void NaClDomHandler::HandleRequestNaClInfo(const ListValue* args) { } void NaClDomHandler::OnGotPlugins( - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { has_plugin_info_ = true; MaybeRespondToPage(); } @@ -282,7 +282,7 @@ void NaClDomHandler::PopulatePageInformation(DictionaryValue* naclInfo) { AddLineBreak(list.get()); // Obtain the version of the NaCl plugin. - std::vector<webkit::WebPluginInfo> info_array; + std::vector<content::WebPluginInfo> info_array; PluginService::GetInstance()->GetPluginInfoArray( GURL(), "application/x-nacl", false, &info_array, NULL); string16 nacl_version; diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc index fa809f1..94b57dd 100644 --- a/chrome/browser/ui/webui/plugins_ui.cc +++ b/chrome/browser/ui/webui/plugins_ui.cc @@ -52,8 +52,8 @@ using content::PluginService; using content::WebContents; +using content::WebPluginInfo; using content::WebUIMessageHandler; -using webkit::WebPluginInfo; namespace { @@ -167,7 +167,7 @@ class PluginsDOMHandler : public WebUIMessageHandler, void LoadPlugins(); // Called on the UI thread when the plugin information is ready. - void PluginsLoaded(const std::vector<webkit::WebPluginInfo>& plugins); + void PluginsLoaded(const std::vector<WebPluginInfo>& plugins); content::NotificationRegistrar registrar_; @@ -329,7 +329,7 @@ void PluginsDOMHandler::LoadPlugins() { } void PluginsDOMHandler::PluginsLoaded( - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<WebPluginInfo>& plugins) { Profile* profile = Profile::FromWebUI(web_ui()); PluginPrefs* plugin_prefs = PluginPrefs::GetForProfile(profile).get(); @@ -371,7 +371,7 @@ void PluginsDOMHandler::PluginsLoaded( plugin_file->SetString("type", PluginTypeToString(group_plugin.type)); ListValue* mime_types = new ListValue(); - const std::vector<webkit::WebPluginMimeType>& plugin_mime_types = + const std::vector<content::WebPluginMimeType>& plugin_mime_types = group_plugin.mime_types; for (size_t k = 0; k < plugin_mime_types.size(); ++k) { DictionaryValue* mime_type = new DictionaryValue(); diff --git a/chrome/browser/ui/webui/translate_internals/translate_internals_handler.h b/chrome/browser/ui/webui/translate_internals/translate_internals_handler.h index bbb84ce..e6a3444 100644 --- a/chrome/browser/ui/webui/translate_internals/translate_internals_handler.h +++ b/chrome/browser/ui/webui/translate_internals/translate_internals_handler.h @@ -9,7 +9,7 @@ #include "chrome/browser/translate/translate_manager.h" #include "content/public/browser/web_ui_message_handler.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" struct LanguageDetectionDetails; struct TranslateErrorDetails; diff --git a/chrome/browser/ui/webui/version_handler.cc b/chrome/browser/ui/webui/version_handler.cc index d6064fe..065b4f2 100644 --- a/chrome/browser/ui/webui/version_handler.cc +++ b/chrome/browser/ui/webui/version_handler.cc @@ -129,9 +129,9 @@ void VersionHandler::OnGotFilePaths(string16* executable_path_data, #if defined(ENABLE_PLUGINS) void VersionHandler::OnGotPlugins( - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { // Obtain the version of the first enabled Flash plugin. - std::vector<webkit::WebPluginInfo> info_array; + std::vector<content::WebPluginInfo> info_array; content::PluginService::GetInstance()->GetPluginInfoArray( GURL(), kFlashPluginSwfMimeType, false, &info_array, NULL); string16 flash_version = diff --git a/chrome/browser/ui/webui/version_handler.h b/chrome/browser/ui/webui/version_handler.h index a8f5b11..2fc65d4 100644 --- a/chrome/browser/ui/webui/version_handler.h +++ b/chrome/browser/ui/webui/version_handler.h @@ -10,7 +10,7 @@ #include "base/memory/weak_ptr.h" #include "base/values.h" #include "content/public/browser/web_ui_message_handler.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" // Handler class for Version page operations. class VersionHandler : public content::WebUIMessageHandler { @@ -34,7 +34,7 @@ class VersionHandler : public content::WebUIMessageHandler { // Callback for GetPlugins which responds to the page with the Flash version. // This also initiates the OS Version load on ChromeOS. - void OnGotPlugins(const std::vector<webkit::WebPluginInfo>& plugins); + void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins); // Factory for the creating refs in callbacks. base::WeakPtrFactory<VersionHandler> weak_ptr_factory_; diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc index f1f8261..8427d7f 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc @@ -140,10 +140,10 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { content::PepperPluginInfo pdf; pdf.path = path; pdf.name = chrome::ChromeContentClient::kPDFPluginName; - webkit::WebPluginMimeType pdf_mime_type(kPDFPluginMimeType, - kPDFPluginExtension, - kPDFPluginDescription); - webkit::WebPluginMimeType print_preview_pdf_mime_type( + content::WebPluginMimeType pdf_mime_type(kPDFPluginMimeType, + kPDFPluginExtension, + kPDFPluginDescription); + content::WebPluginMimeType print_preview_pdf_mime_type( kPDFPluginPrintPreviewMimeType, kPDFPluginExtension, kPDFPluginDescription); @@ -168,14 +168,14 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { content::PepperPluginInfo nacl; nacl.path = path; nacl.name = chrome::ChromeContentClient::kNaClPluginName; - webkit::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType, - kNaClPluginExtension, - kNaClPluginDescription); + content::WebPluginMimeType nacl_mime_type(kNaClPluginMimeType, + kNaClPluginExtension, + kNaClPluginDescription); nacl.mime_types.push_back(nacl_mime_type); if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnablePnacl)) { - webkit::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType, - kPnaclPluginExtension, - kPnaclPluginDescription); + content::WebPluginMimeType pnacl_mime_type(kPnaclPluginMimeType, + kPnaclPluginExtension, + kPnaclPluginDescription); nacl.mime_types.push_back(pnacl_mime_type); } nacl.permissions = kNaClPluginPermissions; @@ -196,9 +196,9 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { o3d.is_out_of_process = true; o3d.is_sandboxed = false; o3d.permissions = kO3DPluginPermissions; - webkit::WebPluginMimeType o3d_mime_type(kO3DPluginMimeType, - kO3DPluginExtension, - kO3DPluginDescription); + content::WebPluginMimeType o3d_mime_type(kO3DPluginMimeType, + kO3DPluginExtension, + kO3DPluginDescription); o3d.mime_types.push_back(o3d_mime_type); plugins->push_back(o3d); @@ -215,9 +215,9 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { o1d.is_out_of_process = true; o1d.is_sandboxed = false; o1d.permissions = kO1DPluginPermissions; - webkit::WebPluginMimeType o1d_mime_type(kO1DPluginMimeType, - kO1DPluginExtension, - kO1DPluginDescription); + content::WebPluginMimeType o1d_mime_type(kO1DPluginMimeType, + kO1DPluginExtension, + kO1DPluginDescription); o1d.mime_types.push_back(o1d_mime_type); plugins->push_back(o1d); @@ -234,9 +234,9 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { gtalk.is_out_of_process = true; gtalk.is_sandboxed = false; gtalk.permissions = kGTalkPluginPermissions; - webkit::WebPluginMimeType gtalk_mime_type(kGTalkPluginMimeType, - kGTalkPluginExtension, - kGTalkPluginDescription); + content::WebPluginMimeType gtalk_mime_type(kGTalkPluginMimeType, + kGTalkPluginExtension, + kGTalkPluginDescription); gtalk.mime_types.push_back(gtalk_mime_type); plugins->push_back(gtalk); @@ -255,7 +255,7 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { widevine_cdm.name = kWidevineCdmDisplayName; widevine_cdm.description = kWidevineCdmDescription; widevine_cdm.version = WIDEVINE_CDM_VERSION_STRING; - webkit::WebPluginMimeType widevine_cdm_mime_type( + content::WebPluginMimeType widevine_cdm_mime_type( kWidevineCdmPluginMimeType, kWidevineCdmPluginExtension, kWidevineCdmPluginMimeTypeDescription); @@ -277,7 +277,7 @@ void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { info.name = kRemotingViewerPluginName; info.description = kRemotingViewerPluginDescription; info.path = base::FilePath(kRemotingViewerPluginPath); - webkit::WebPluginMimeType remoting_mime_type( + content::WebPluginMimeType remoting_mime_type( kRemotingViewerPluginMimeType, kRemotingViewerPluginMimeExtension, kRemotingViewerPluginMimeDescription); @@ -321,13 +321,13 @@ content::PepperPluginInfo CreatePepperFlashInfo(const base::FilePath& path, plugin.description = plugin.name + " " + flash_version_numbers[0] + "." + flash_version_numbers[1] + " r" + flash_version_numbers[2]; plugin.version = JoinString(flash_version_numbers, '.'); - webkit::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, - kFlashPluginSwfExtension, - kFlashPluginSwfDescription); + content::WebPluginMimeType swf_mime_type(kFlashPluginSwfMimeType, + kFlashPluginSwfExtension, + kFlashPluginSwfDescription); plugin.mime_types.push_back(swf_mime_type); - webkit::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType, - kFlashPluginSplExtension, - kFlashPluginSplDescription); + content::WebPluginMimeType spl_mime_type(kFlashPluginSplMimeType, + kFlashPluginSplExtension, + kFlashPluginSplDescription); plugin.mime_types.push_back(spl_mime_type); return plugin; diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 92ff235..01d8978 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -135,7 +135,7 @@ IPC_STRUCT_TRAITS_END() // Output parameters for ChromeViewHostMsg_GetPluginInfo message. IPC_STRUCT_BEGIN(ChromeViewHostMsg_GetPluginInfo_Output) IPC_STRUCT_MEMBER(ChromeViewHostMsg_GetPluginInfo_Status, status) - IPC_STRUCT_MEMBER(webkit::WebPluginInfo, plugin) + IPC_STRUCT_MEMBER(content::WebPluginInfo, plugin) IPC_STRUCT_MEMBER(std::string, actual_mime_type) IPC_STRUCT_MEMBER(std::string, group_identifier) IPC_STRUCT_MEMBER(string16, group_name) diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc index e17227a..ab39f59 100644 --- a/chrome/renderer/chrome_content_renderer_client.cc +++ b/chrome/renderer/chrome_content_renderer_client.cc @@ -110,6 +110,7 @@ using autofill::AutofillAgent; using autofill::PasswordAutofillAgent; using autofill::PasswordGenerationManager; using content::RenderThread; +using content::WebPluginInfo; using extensions::Extension; using WebKit::WebCache; using WebKit::WebConsoleMessage; @@ -117,8 +118,6 @@ using WebKit::WebDataSource; using WebKit::WebDocument; using WebKit::WebFrame; using WebKit::WebPlugin; -using webkit::WebPluginInfo; -using webkit::WebPluginMimeType; using WebKit::WebPluginParams; using WebKit::WebSecurityOrigin; using WebKit::WebSecurityPolicy; @@ -556,7 +555,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( // In Aura for Windows we need to check if we can load NPAPI plugins. // For example, if the render view is in the Ash desktop, we should not. if (status_value == ChromeViewHostMsg_GetPluginInfo_Status::kAllowed && - plugin.type == webkit::WebPluginInfo::PLUGIN_TYPE_NPAPI) { + plugin.type == content::WebPluginInfo::PLUGIN_TYPE_NPAPI) { if (observer->AreNPAPIPluginsBlocked()) status_value = ChromeViewHostMsg_GetPluginInfo_Status::kNPAPINotSupported; @@ -742,13 +741,13 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( // static GURL ChromeContentRendererClient::GetNaClContentHandlerURL( const std::string& actual_mime_type, - const WebPluginInfo& plugin) { + const content::WebPluginInfo& plugin) { // Look for the manifest URL among the MIME type's additonal parameters. const char* kNaClPluginManifestAttribute = "nacl"; string16 nacl_attr = ASCIIToUTF16(kNaClPluginManifestAttribute); for (size_t i = 0; i < plugin.mime_types.size(); ++i) { if (plugin.mime_types[i].mime_type == actual_mime_type) { - const WebPluginMimeType& content_type = plugin.mime_types[i]; + const content::WebPluginMimeType& content_type = plugin.mime_types[i]; for (size_t i = 0; i < content_type.additional_param_names.size(); ++i) { if (content_type.additional_param_names[i] == nacl_attr) return GURL(content_type.additional_param_values[i]); diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h index 7d8b225..8af6d11 100644 --- a/chrome/renderer/chrome_content_renderer_client.h +++ b/chrome/renderer/chrome_content_renderer_client.h @@ -26,6 +26,10 @@ class SpellCheckProvider; struct ChromeViewHostMsg_GetPluginInfo_Output; +namespace content { +struct WebPluginInfo; +} + namespace extensions { class Dispatcher; class Extension; @@ -44,10 +48,6 @@ namespace visitedlink { class VisitedLinkSlave; } -namespace webkit { -struct WebPluginInfo; -} - namespace WebKit { class WebSecurityOrigin; } @@ -176,7 +176,7 @@ class ChromeContentRendererClient : public content::ContentRendererClient { bool is_initial_navigation); static GURL GetNaClContentHandlerURL(const std::string& actual_mime_type, - const webkit::WebPluginInfo& plugin); + const content::WebPluginInfo& plugin); static bool IsNaClAllowed(const GURL& manifest_url, const GURL& app_url, bool is_nacl_unrestricted, diff --git a/chrome/renderer/chrome_content_renderer_client_unittest.cc b/chrome/renderer/chrome_content_renderer_client_unittest.cc index 491291d..d26b452 100644 --- a/chrome/renderer/chrome_content_renderer_client_unittest.cc +++ b/chrome/renderer/chrome_content_renderer_client_unittest.cc @@ -8,19 +8,19 @@ #include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension_builder.h" #include "chrome/common/extensions/extension_manifest_constants.h" +#include "content/public/common/webplugininfo.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/public/platform/WebString.h" #include "third_party/WebKit/public/platform/WebVector.h" #include "third_party/WebKit/public/web/WebPluginParams.h" #include "url/gurl.h" -#include "webkit/plugins/webplugininfo.h" using WebKit::WebPluginParams; using WebKit::WebString; using WebKit::WebVector; using chrome::ChromeContentRendererClient; -using webkit::WebPluginInfo; -using webkit::WebPluginMimeType; +using content::WebPluginInfo; +using content::WebPluginMimeType; namespace chrome { @@ -58,10 +58,10 @@ void AddFakeDevAttribute(WebPluginParams* params) { params->attributeValues.swap(values); } -void AddContentTypeHandler(WebPluginInfo* info, +void AddContentTypeHandler(content::WebPluginInfo* info, const char* mime_type, const char* manifest_url) { - WebPluginMimeType mime_type_info; + content::WebPluginMimeType mime_type_info; mime_type_info.mime_type = mime_type; mime_type_info.additional_param_names.push_back(UTF8ToUTF16("nacl")); mime_type_info.additional_param_values.push_back( diff --git a/chrome/renderer/plugins/plugin_placeholder.cc b/chrome/renderer/plugins/plugin_placeholder.cc index 126f5ce..bcc4fb2 100644 --- a/chrome/renderer/plugins/plugin_placeholder.cc +++ b/chrome/renderer/plugins/plugin_placeholder.cc @@ -53,7 +53,6 @@ using WebKit::WebMouseEvent; using WebKit::WebNode; using WebKit::WebPlugin; using WebKit::WebPluginContainer; -using webkit::WebPluginInfo; using WebKit::WebPluginParams; using WebKit::WebPoint; using WebKit::WebScriptSource; @@ -150,7 +149,7 @@ PluginPlaceholder* PluginPlaceholder::CreateBlockedPlugin( RenderView* render_view, WebFrame* frame, const WebPluginParams& params, - const WebPluginInfo& plugin, + const content::WebPluginInfo& plugin, const std::string& identifier, const string16& name, int template_id, diff --git a/chrome/renderer/plugins/plugin_placeholder.h b/chrome/renderer/plugins/plugin_placeholder.h index 1695475..7ec95bae 100644 --- a/chrome/renderer/plugins/plugin_placeholder.h +++ b/chrome/renderer/plugins/plugin_placeholder.h @@ -6,16 +6,16 @@ #define CHROME_RENDERER_PLUGINS_PLUGIN_PLACEHOLDER_H_ #include "chrome/renderer/plugins/webview_plugin.h" +#include "content/public/common/webplugininfo.h" #include "content/public/renderer/context_menu_client.h" #include "content/public/renderer/render_process_observer.h" #include "content/public/renderer/render_view_observer.h" #include "third_party/WebKit/public/web/WebPluginParams.h" -#include "webkit/plugins/webplugininfo.h" #include "webkit/renderer/cpp_bound_class.h" struct ChromeViewHostMsg_GetPluginInfo_Status; -namespace webkit { +namespace content { struct WebPluginInfo; } @@ -41,7 +41,7 @@ class PluginPlaceholder : public content::RenderViewObserver, content::RenderView* render_view, WebKit::WebFrame* frame, const WebKit::WebPluginParams& params, - const webkit::WebPluginInfo& info, + const content::WebPluginInfo& info, const std::string& identifier, const string16& name, int resource_id, @@ -160,7 +160,7 @@ class PluginPlaceholder : public content::RenderViewObserver, WebKit::WebPluginParams plugin_params_; WebViewPlugin* plugin_; - webkit::WebPluginInfo plugin_info_; + content::WebPluginInfo plugin_info_; string16 title_; string16 message_; diff --git a/chrome/test/nacl/nacl_browsertest_util.cc b/chrome/test/nacl/nacl_browsertest_util.cc index a5b558c..48cde92 100644 --- a/chrome/test/nacl/nacl_browsertest_util.cc +++ b/chrome/test/nacl/nacl_browsertest_util.cc @@ -17,8 +17,8 @@ #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/plugin_service.h" #include "content/public/browser/web_contents.h" +#include "content/public/common/webplugininfo.h" #include "net/base/net_util.h" -#include "webkit/plugins/webplugininfo.h" typedef TestMessageHandler::MessageResponse MessageResponse; diff --git a/components/autofill/content/browser/risk/fingerprint.cc b/components/autofill/content/browser/risk/fingerprint.cc index 6bbcbd2..635224d 100644 --- a/components/autofill/content/browser/risk/fingerprint.cc +++ b/components/autofill/content/browser/risk/fingerprint.cc @@ -35,12 +35,12 @@ #include "content/public/browser/web_contents_view.h" #include "content/public/common/content_client.h" #include "content/public/common/geoposition.h" +#include "content/public/common/webplugininfo.h" #include "gpu/config/gpu_info.h" #include "third_party/WebKit/public/platform/WebRect.h" #include "third_party/WebKit/public/platform/WebScreenInfo.h" #include "ui/gfx/rect.h" #include "ui/gfx/screen.h" -#include "webkit/plugins/webplugininfo.h" using WebKit::WebScreenInfo; @@ -102,15 +102,15 @@ void AddFontsToFingerprint(const base::ListValue& fonts, } // Adds the list of |plugins| to the |machine|. -void AddPluginsToFingerprint(const std::vector<webkit::WebPluginInfo>& plugins, +void AddPluginsToFingerprint(const std::vector<content::WebPluginInfo>& plugins, Fingerprint::MachineCharacteristics* machine) { - for (std::vector<webkit::WebPluginInfo>::const_iterator it = plugins.begin(); + for (std::vector<content::WebPluginInfo>::const_iterator it = plugins.begin(); it != plugins.end(); ++it) { Fingerprint::MachineCharacteristics::Plugin* plugin = machine->add_plugin(); plugin->set_name(UTF16ToUTF8(it->name)); plugin->set_description(UTF16ToUTF8(it->desc)); - for (std::vector<webkit::WebPluginMimeType>::const_iterator mime_type = + for (std::vector<content::WebPluginMimeType>::const_iterator mime_type = it->mime_types.begin(); mime_type != it->mime_types.end(); ++mime_type) { plugin->add_mime_type(mime_type->mime_type); @@ -213,7 +213,7 @@ class FingerprintDataLoader : public content::GpuDataManagerObserver { // Callbacks for asynchronously loaded data. void OnGotFonts(scoped_ptr<base::ListValue> fonts); - void OnGotPlugins(const std::vector<webkit::WebPluginInfo>& plugins); + void OnGotPlugins(const std::vector<content::WebPluginInfo>& plugins); void OnGotGeoposition(const content::Geoposition& geoposition); // Methods that run on the IO thread to communicate with the @@ -254,7 +254,7 @@ class FingerprintDataLoader : public content::GpuDataManagerObserver { // Data that will be loaded asynchronously. scoped_ptr<base::ListValue> fonts_; - std::vector<webkit::WebPluginInfo> plugins_; + std::vector<content::WebPluginInfo> plugins_; bool waiting_on_plugins_; content::Geoposition geoposition_; @@ -334,7 +334,7 @@ void FingerprintDataLoader::OnGotFonts(scoped_ptr<base::ListValue> fonts) { } void FingerprintDataLoader::OnGotPlugins( - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<content::WebPluginInfo>& plugins) { DCHECK(waiting_on_plugins_); waiting_on_plugins_ = false; plugins_ = plugins; diff --git a/content/browser/loader/buffered_resource_handler.cc b/content/browser/loader/buffered_resource_handler.cc index c31fd80..a3afb3f 100644 --- a/content/browser/loader/buffered_resource_handler.cc +++ b/content/browser/loader/buffered_resource_handler.cc @@ -23,13 +23,13 @@ #include "content/public/browser/resource_context.h" #include "content/public/browser/resource_dispatcher_host_delegate.h" #include "content/public/common/resource_response.h" +#include "content/public/common/webplugininfo.h" #include "net/base/io_buffer.h" #include "net/base/mime_sniffer.h" #include "net/base/mime_util.h" #include "net/base/net_errors.h" #include "net/http/http_content_disposition.h" #include "net/http/http_response_headers.h" -#include "webkit/plugins/webplugininfo.h" namespace content { @@ -439,7 +439,7 @@ bool BufferedResourceHandler::HasSupportingPlugin(bool* stale) { ResourceRequestInfoImpl* info = ResourceRequestInfoImpl::ForRequest(request_); bool allow_wildcard = false; - webkit::WebPluginInfo plugin; + WebPluginInfo plugin; return PluginServiceImpl::GetInstance()->GetPluginInfo( info->GetChildID(), info->GetRouteID(), info->GetContext(), request_->url(), GURL(), response_->head.mime_type, allow_wildcard, @@ -461,7 +461,7 @@ bool BufferedResourceHandler::CopyReadBufferToNextHandler(int request_id) { } void BufferedResourceHandler::OnPluginsLoaded( - const std::vector<webkit::WebPluginInfo>& plugins) { + const std::vector<WebPluginInfo>& plugins) { bool defer = false; if (!ProcessResponse(&defer)) { controller()->Cancel(); diff --git a/content/browser/loader/buffered_resource_handler.h b/content/browser/loader/buffered_resource_handler.h index ee70a3d..c1a7a6e 100644 --- a/content/browser/loader/buffered_resource_handler.h +++ b/content/browser/loader/buffered_resource_handler.h @@ -16,12 +16,9 @@ namespace net { class URLRequest; } -namespace webkit { -struct WebPluginInfo; -} - namespace content { class ResourceDispatcherHostImpl; +struct WebPluginInfo; // Used to buffer a request until enough data has been received. class BufferedResourceHandler @@ -72,7 +69,7 @@ class BufferedResourceHandler bool CopyReadBufferToNextHandler(int request_id); // Called on the IO thread once the list of plugins has been loaded. - void OnPluginsLoaded(const std::vector<webkit::WebPluginInfo>& plugins); + void OnPluginsLoaded(const std::vector<WebPluginInfo>& plugins); enum State { STATE_STARTING, diff --git a/content/browser/plugin_data_remover_impl.cc b/content/browser/plugin_data_remover_impl.cc index 45b799b..d711f80 100644 --- a/content/browser/plugin_data_remover_impl.cc +++ b/content/browser/plugin_data_remover_impl.cc @@ -41,16 +41,16 @@ PluginDataRemover* PluginDataRemover::Create(BrowserContext* browser_context) { // static void PluginDataRemover::GetSupportedPlugins( - std::vector<webkit::WebPluginInfo>* supported_plugins) { + std::vector<WebPluginInfo>* supported_plugins) { bool allow_wildcard = false; - std::vector<webkit::WebPluginInfo> plugins; + std::vector<WebPluginInfo> plugins; PluginService::GetInstance()->GetPluginInfoArray( GURL(), kFlashPluginSwfMimeType, allow_wildcard, &plugins, NULL); Version min_version(kMinFlashVersion); - for (std::vector<webkit::WebPluginInfo>::iterator it = plugins.begin(); + for (std::vector<WebPluginInfo>::iterator it = plugins.begin(); it != plugins.end(); ++it) { Version version; - webkit::WebPluginInfo::CreateVersionFromString(it->version, &version); + WebPluginInfo::CreateVersionFromString(it->version, &version); if (version.IsValid() && min_version.CompareTo(version) == -1) supported_plugins->push_back(*it); } @@ -88,7 +88,7 @@ class PluginDataRemoverImpl::Context PluginServiceImpl* plugin_service = PluginServiceImpl::GetInstance(); // Get the plugin file path. - std::vector<webkit::WebPluginInfo> plugins; + std::vector<WebPluginInfo> plugins; plugin_service->GetPluginInfoArray( GURL(), mime_type, false, &plugins, NULL); base::FilePath plugin_path; @@ -135,7 +135,7 @@ class PluginDataRemoverImpl::Context return resource_context_; } - virtual void SetPluginInfo(const webkit::WebPluginInfo& info) OVERRIDE {} + virtual void SetPluginInfo(const WebPluginInfo& info) OVERRIDE {} virtual void OnFoundPluginProcessHost(PluginProcessHost* host) OVERRIDE {} diff --git a/content/browser/plugin_loader_posix.cc b/content/browser/plugin_loader_posix.cc index 7aa2b89..e6bc3ea 100644 --- a/content/browser/plugin_loader_posix.cc +++ b/content/browser/plugin_loader_posix.cc @@ -116,7 +116,7 @@ void PluginLoaderPosix::LoadPluginsInternal() { } void PluginLoaderPosix::OnPluginLoaded(uint32 index, - const webkit::WebPluginInfo& plugin) { + const WebPluginInfo& plugin) { if (index != next_load_index_) { LOG(ERROR) << "Received unexpected plugin load message for " << plugin.path.value() << "; index=" << index; @@ -147,8 +147,7 @@ void PluginLoaderPosix::OnPluginLoadFailed(uint32 index, bool PluginLoaderPosix::MaybeAddInternalPlugin( const base::FilePath& plugin_path) { - for (std::vector<webkit::WebPluginInfo>::iterator it = - internal_plugins_.begin(); + for (std::vector<WebPluginInfo>::iterator it = internal_plugins_.begin(); it != internal_plugins_.end(); ++it) { if (it->path == plugin_path) { diff --git a/content/browser/plugin_loader_posix.h b/content/browser/plugin_loader_posix.h index 12bec96..60cd5c6 100644 --- a/content/browser/plugin_loader_posix.h +++ b/content/browser/plugin_loader_posix.h @@ -14,8 +14,8 @@ #include "base/time/time.h" #include "content/browser/plugin_service_impl.h" #include "content/public/browser/utility_process_host_client.h" +#include "content/public/common/webplugininfo.h" #include "ipc/ipc_sender.h" -#include "webkit/plugins/webplugininfo.h" namespace base { class MessageLoopProxy; @@ -82,7 +82,7 @@ class CONTENT_EXPORT PluginLoaderPosix virtual void LoadPluginsInternal(); // Message handlers. - void OnPluginLoaded(uint32 index, const webkit::WebPluginInfo& plugin); + void OnPluginLoaded(uint32 index, const WebPluginInfo& plugin); void OnPluginLoadFailed(uint32 index, const base::FilePath& plugin_path); // Checks if the plugin path is an internal plugin, and, if it is, adds it to @@ -106,10 +106,10 @@ class CONTENT_EXPORT PluginLoaderPosix size_t next_load_index_; // Internal plugins that have been registered at the time of loading. - std::vector<webkit::WebPluginInfo> internal_plugins_; + std::vector<WebPluginInfo> internal_plugins_; // A vector of plugins that have been loaded successfully. - std::vector<webkit::WebPluginInfo> loaded_plugins_; + std::vector<WebPluginInfo> loaded_plugins_; // The callback and message loop on which the callback will be run when the // plugin loading process has been completed. diff --git a/content/browser/plugin_loader_posix_unittest.cc b/content/browser/plugin_loader_posix_unittest.cc index 6defebb..8f90723 100644 --- a/content/browser/plugin_loader_posix_unittest.cc +++ b/content/browser/plugin_loader_posix_unittest.cc @@ -13,7 +13,6 @@ #include "content/browser/browser_thread_impl.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -#include "webkit/plugins/webplugininfo.h" namespace content { @@ -33,11 +32,11 @@ class MockPluginLoaderPosix : public PluginLoaderPosix { return next_load_index_; } - const std::vector<webkit::WebPluginInfo>& loaded_plugins() { + const std::vector<WebPluginInfo>& loaded_plugins() { return loaded_plugins_; } - std::vector<webkit::WebPluginInfo>* internal_plugins() { + std::vector<WebPluginInfo>* internal_plugins() { return &internal_plugins_; } @@ -45,7 +44,7 @@ class MockPluginLoaderPosix : public PluginLoaderPosix { PluginLoaderPosix::LoadPluginsInternal(); } - void TestOnPluginLoaded(uint32 index, const webkit::WebPluginInfo& plugin) { + void TestOnPluginLoaded(uint32 index, const WebPluginInfo& plugin) { OnPluginLoaded(index, plugin); } @@ -57,7 +56,7 @@ class MockPluginLoaderPosix : public PluginLoaderPosix { virtual ~MockPluginLoaderPosix() {} }; -void VerifyCallback(int* run_count, const std::vector<webkit::WebPluginInfo>&) { +void VerifyCallback(int* run_count, const std::vector<WebPluginInfo>&) { ++(*run_count); } @@ -90,9 +89,9 @@ class PluginLoaderPosixTest : public testing::Test { } // Data used for testing. - webkit::WebPluginInfo plugin1_; - webkit::WebPluginInfo plugin2_; - webkit::WebPluginInfo plugin3_; + WebPluginInfo plugin1_; + WebPluginInfo plugin2_; + WebPluginInfo plugin3_; private: base::ShadowingAtExitManager at_exit_manager_; // Destroys PluginService. @@ -152,8 +151,7 @@ TEST_F(PluginLoaderPosixTest, ThreeSuccessfulLoads) { EXPECT_EQ(0u, plugin_loader()->next_load_index()); - const std::vector<webkit::WebPluginInfo>& plugins( - plugin_loader()->loaded_plugins()); + const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins()); plugin_loader()->TestOnPluginLoaded(0, plugin1_); EXPECT_EQ(1u, plugin_loader()->next_load_index()); @@ -193,8 +191,7 @@ TEST_F(PluginLoaderPosixTest, ThreeSuccessfulLoadsThenCrash) { EXPECT_EQ(0u, plugin_loader()->next_load_index()); - const std::vector<webkit::WebPluginInfo>& plugins( - plugin_loader()->loaded_plugins()); + const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins()); plugin_loader()->TestOnPluginLoaded(0, plugin1_); EXPECT_EQ(1u, plugin_loader()->next_load_index()); @@ -236,8 +233,7 @@ TEST_F(PluginLoaderPosixTest, TwoFailures) { EXPECT_EQ(0u, plugin_loader()->next_load_index()); - const std::vector<webkit::WebPluginInfo>& plugins( - plugin_loader()->loaded_plugins()); + const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins()); plugin_loader()->TestOnPluginLoadFailed(0, plugin1_.path); EXPECT_EQ(1u, plugin_loader()->next_load_index()); @@ -275,8 +271,7 @@ TEST_F(PluginLoaderPosixTest, CrashedProcess) { EXPECT_EQ(0u, plugin_loader()->next_load_index()); - const std::vector<webkit::WebPluginInfo>& plugins( - plugin_loader()->loaded_plugins()); + const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins()); plugin_loader()->TestOnPluginLoaded(0, plugin1_); EXPECT_EQ(1u, plugin_loader()->next_load_index()); @@ -313,8 +308,7 @@ TEST_F(PluginLoaderPosixTest, InternalPlugin) { EXPECT_EQ(0u, plugin_loader()->next_load_index()); - const std::vector<webkit::WebPluginInfo>& plugins( - plugin_loader()->loaded_plugins()); + const std::vector<WebPluginInfo>& plugins(plugin_loader()->loaded_plugins()); plugin_loader()->TestOnPluginLoaded(0, plugin1_); EXPECT_EQ(1u, plugin_loader()->next_load_index()); diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index fcde1ff..bffd16e 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -145,7 +145,7 @@ bool PluginProcessHost::Send(IPC::Message* message) { return process_->Send(message); } -bool PluginProcessHost::Init(const webkit::WebPluginInfo& info) { +bool PluginProcessHost::Init(const WebPluginInfo& info) { info_ = info; process_->SetName(info_.name); diff --git a/content/browser/plugin_process_host.h b/content/browser/plugin_process_host.h index 63696ef..61ce44d 100644 --- a/content/browser/plugin_process_host.h +++ b/content/browser/plugin_process_host.h @@ -19,8 +19,8 @@ #include "content/public/browser/browser_child_process_host_delegate.h" #include "content/public/browser/browser_child_process_host_iterator.h" #include "content/public/common/process_type.h" +#include "content/public/common/webplugininfo.h" #include "ipc/ipc_channel_proxy.h" -#include "webkit/plugins/webplugininfo.h" #include "ui/gfx/native_widget_types.h" namespace gfx { @@ -54,7 +54,7 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate, // Returns the resource context for the renderer requesting the channel. virtual ResourceContext* GetResourceContext() = 0; virtual bool OffTheRecord() = 0; - virtual void SetPluginInfo(const webkit::WebPluginInfo& info) = 0; + virtual void SetPluginInfo(const WebPluginInfo& info) = 0; virtual void OnFoundPluginProcessHost(PluginProcessHost* host) = 0; virtual void OnSentPluginChannelRequest() = 0; // The client should delete itself when one of these methods is called. @@ -73,7 +73,7 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate, // Initialize the new plugin process, returning true on success. This must // be called before the object can be used. - bool Init(const webkit::WebPluginInfo& info); + bool Init(const WebPluginInfo& info); // Force the plugin process to shutdown (cleanly). void ForceShutdown(); @@ -108,7 +108,7 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate, void OnAppActivation(); #endif - const webkit::WebPluginInfo& info() const { return info_; } + const WebPluginInfo& info() const { return info_; } #if defined(OS_WIN) // Tracks plugin parent windows created on the browser UI thread. @@ -157,7 +157,7 @@ class CONTENT_EXPORT PluginProcessHost : public BrowserChildProcessHostDelegate, std::list<Client*> sent_requests_; // Information about the plugin. - webkit::WebPluginInfo info_; + WebPluginInfo info_; #if defined(OS_WIN) // Tracks plugin parent windows created on the UI thread. diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc index 5ebfe20..64efebc 100644 --- a/content/browser/plugin_service_impl.cc +++ b/content/browser/plugin_service_impl.cc @@ -28,8 +28,8 @@ #include "content/public/browser/resource_context.h" #include "content/public/common/content_switches.h" #include "content/public/common/process_type.h" +#include "content/public/common/webplugininfo.h" #include "webkit/plugins/plugin_constants.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_WIN) #include "content/common/plugin_constants_win.h" @@ -176,13 +176,13 @@ void PluginServiceImpl::Init() { // type we use with the plugin, so the renderer can instantiate it. const CommandLine* command_line = CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kSitePerProcess)) { - webkit::WebPluginInfo webview_plugin( + WebPluginInfo webview_plugin( ASCIIToUTF16("WebView Tag"), base::FilePath(), ASCIIToUTF16("1.2.3.4"), ASCIIToUTF16("Browser Plugin.")); - webview_plugin.type = webkit::WebPluginInfo::PLUGIN_TYPE_NPAPI; - webkit::WebPluginMimeType webview_plugin_mime_type; + webview_plugin.type = WebPluginInfo::PLUGIN_TYPE_NPAPI; + WebPluginMimeType webview_plugin_mime_type; webview_plugin_mime_type.mime_type = "application/browser-plugin"; webview_plugin_mime_type.file_extensions.push_back("*"); webview_plugin.mime_types.push_back(webview_plugin_mime_type); @@ -302,7 +302,7 @@ PluginProcessHost* PluginServiceImpl::FindOrStartNpapiPluginProcess( if (plugin_host) return plugin_host; - webkit::WebPluginInfo info; + WebPluginInfo info; if (!GetPluginInfoByPath(plugin_path, &info)) { return NULL; } @@ -448,7 +448,7 @@ void PluginServiceImpl::ForwardGetAllowedPluginForOpenChannelToPlugin( const GURL& url, const std::string& mime_type, PluginProcessHost::Client* client, - const std::vector<webkit::WebPluginInfo>&) { + const std::vector<WebPluginInfo>&) { GetAllowedPluginForOpenChannelToPlugin(params.render_process_id, params.render_view_id, url, params.page_url, mime_type, client, params.resource_context); @@ -462,7 +462,7 @@ void PluginServiceImpl::GetAllowedPluginForOpenChannelToPlugin( const std::string& mime_type, PluginProcessHost::Client* client, ResourceContext* resource_context) { - webkit::WebPluginInfo info; + WebPluginInfo info; bool allow_wildcard = true; bool found = GetPluginInfo( render_process_id, render_view_id, resource_context, @@ -507,7 +507,7 @@ bool PluginServiceImpl::GetPluginInfoArray( const GURL& url, const std::string& mime_type, bool allow_wildcard, - std::vector<webkit::WebPluginInfo>* plugins, + std::vector<WebPluginInfo>* plugins, std::vector<std::string>* actual_mime_types) { bool use_stale = false; PluginList::Singleton()->GetPluginInfoArray( @@ -524,9 +524,9 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, const std::string& mime_type, bool allow_wildcard, bool* is_stale, - webkit::WebPluginInfo* info, + WebPluginInfo* info, std::string* actual_mime_type) { - std::vector<webkit::WebPluginInfo> plugins; + std::vector<WebPluginInfo> plugins; std::vector<std::string> mime_types; bool stale = GetPluginInfoArray( url, mime_type, allow_wildcard, &plugins, &mime_types); @@ -550,11 +550,11 @@ bool PluginServiceImpl::GetPluginInfo(int render_process_id, } bool PluginServiceImpl::GetPluginInfoByPath(const base::FilePath& plugin_path, - webkit::WebPluginInfo* info) { - std::vector<webkit::WebPluginInfo> plugins; + WebPluginInfo* info) { + std::vector<WebPluginInfo> plugins; PluginList::Singleton()->GetPluginsNoRefresh(&plugins); - for (std::vector<webkit::WebPluginInfo>::iterator it = plugins.begin(); + for (std::vector<WebPluginInfo>::iterator it = plugins.begin(); it != plugins.end(); ++it) { if (it->path == plugin_path) { @@ -569,7 +569,7 @@ bool PluginServiceImpl::GetPluginInfoByPath(const base::FilePath& plugin_path, string16 PluginServiceImpl::GetPluginDisplayNameByPath( const base::FilePath& path) { string16 plugin_name = path.LossyDisplayName(); - webkit::WebPluginInfo info; + WebPluginInfo info; if (PluginService::GetInstance()->GetPluginInfoByPath(path, &info) && !info.name.empty()) { plugin_name = info.name; @@ -600,7 +600,7 @@ void PluginServiceImpl::GetPlugins(const GetPluginsCallback& callback) { return; } #if defined(OS_POSIX) - std::vector<webkit::WebPluginInfo> cached_plugins; + std::vector<WebPluginInfo> cached_plugins; if (PluginList::Singleton()->GetPluginsNoRefresh(&cached_plugins)) { // Can't assume the caller is reentrant. target_loop->PostTask(FROM_HERE, @@ -625,7 +625,7 @@ void PluginServiceImpl::GetPluginsInternal( DCHECK(BrowserThread::GetBlockingPool()->IsRunningSequenceOnCurrentThread( plugin_list_token_)); - std::vector<webkit::WebPluginInfo> plugins; + std::vector<WebPluginInfo> plugins; PluginList::Singleton()->GetPlugins(&plugins, NPAPIPluginsSupported()); target_loop->PostTask(FROM_HERE, @@ -674,7 +674,7 @@ PepperPluginInfo* PluginServiceImpl::GetRegisteredPpapiPluginInfo( // can be obtained from the PluginList singleton and we can use it to // construct it and add it to the list. This same deal needs to be done // in the renderer side in PepperPluginRegistry. - webkit::WebPluginInfo webplugin_info; + WebPluginInfo webplugin_info; if (!GetPluginInfoByPath(plugin_path, &webplugin_info)) return NULL; PepperPluginInfo new_pepper_info; @@ -771,10 +771,10 @@ void PluginServiceImpl::AddExtraPluginDir(const base::FilePath& path) { } void PluginServiceImpl::RegisterInternalPlugin( - const webkit::WebPluginInfo& info, + const WebPluginInfo& info, bool add_at_beginning) { if (!NPAPIPluginsSupported() && - info.type == webkit::WebPluginInfo::PLUGIN_TYPE_NPAPI) { + info.type == WebPluginInfo::PLUGIN_TYPE_NPAPI) { DLOG(INFO) << "Don't register NPAPI plugins when they're not supported"; return; } @@ -786,7 +786,7 @@ void PluginServiceImpl::UnregisterInternalPlugin(const base::FilePath& path) { } void PluginServiceImpl::GetInternalPlugins( - std::vector<webkit::WebPluginInfo>* plugins) { + std::vector<WebPluginInfo>* plugins) { PluginList::Singleton()->GetInternalPlugins(plugins); } diff --git a/content/browser/plugin_service_impl.h b/content/browser/plugin_service_impl.h index d88f3eb..d71cacc 100644 --- a/content/browser/plugin_service_impl.h +++ b/content/browser/plugin_service_impl.h @@ -76,7 +76,7 @@ class CONTENT_EXPORT PluginServiceImpl const GURL& url, const std::string& mime_type, bool allow_wildcard, - std::vector<webkit::WebPluginInfo>* info, + std::vector<WebPluginInfo>* info, std::vector<std::string>* actual_mime_types) OVERRIDE; virtual bool GetPluginInfo(int render_process_id, int render_view_id, @@ -86,10 +86,10 @@ class CONTENT_EXPORT PluginServiceImpl const std::string& mime_type, bool allow_wildcard, bool* is_stale, - webkit::WebPluginInfo* info, + WebPluginInfo* info, std::string* actual_mime_type) OVERRIDE; virtual bool GetPluginInfoByPath(const base::FilePath& plugin_path, - webkit::WebPluginInfo* info) OVERRIDE; + WebPluginInfo* info) OVERRIDE; virtual string16 GetPluginDisplayNameByPath( const base::FilePath& path) OVERRIDE; virtual void GetPlugins(const GetPluginsCallback& callback) OVERRIDE; @@ -104,10 +104,10 @@ class CONTENT_EXPORT PluginServiceImpl virtual void RemoveExtraPluginPath(const base::FilePath& path) OVERRIDE; virtual void AddExtraPluginDir(const base::FilePath& path) OVERRIDE; virtual void RegisterInternalPlugin( - const webkit::WebPluginInfo& info, bool add_at_beginning) OVERRIDE; + const WebPluginInfo& info, bool add_at_beginning) OVERRIDE; virtual void UnregisterInternalPlugin(const base::FilePath& path) OVERRIDE; virtual void GetInternalPlugins( - std::vector<webkit::WebPluginInfo>* plugins) OVERRIDE; + std::vector<WebPluginInfo>* plugins) OVERRIDE; virtual bool NPAPIPluginsSupported() OVERRIDE; virtual void DisablePluginsDiscoveryForTesting() OVERRIDE; #if defined(OS_MACOSX) @@ -191,7 +191,7 @@ class CONTENT_EXPORT PluginServiceImpl const GURL& url, const std::string& mime_type, PluginProcessHost::Client* client, - const std::vector<webkit::WebPluginInfo>&); + const std::vector<WebPluginInfo>&); // Helper so we can do the plugin lookup on the FILE thread. void GetAllowedPluginForOpenChannelToPlugin( int render_process_id, diff --git a/content/browser/plugin_service_impl_browsertest.cc b/content/browser/plugin_service_impl_browsertest.cc index 0f61e2f..1abf725 100644 --- a/content/browser/plugin_service_impl_browsertest.cc +++ b/content/browser/plugin_service_impl_browsertest.cc @@ -64,7 +64,7 @@ class MockPluginProcessHostClient : public PluginProcessHost::Client, ASSERT_TRUE(channel_->Connect()); } - virtual void SetPluginInfo(const webkit::WebPluginInfo& info) OVERRIDE { + virtual void SetPluginInfo(const WebPluginInfo& info) OVERRIDE { ASSERT_TRUE(info.mime_types.size()); ASSERT_EQ(kNPAPITestPluginMimeType, info.mime_types[0].mime_type); set_plugin_info_called_ = true; @@ -125,7 +125,7 @@ class MockPluginServiceFilter : public content::PluginServiceFilter { const void* context, const GURL& url, const GURL& policy_url, - webkit::WebPluginInfo* plugin) OVERRIDE { return true; } + WebPluginInfo* plugin) OVERRIDE { return true; } virtual bool CanLoadPlugin( int render_process_id, @@ -201,7 +201,7 @@ class MockCanceledPluginServiceClient : public PluginProcessHost::Client { MOCK_METHOD1(OnFoundPluginProcessHost, void(PluginProcessHost* host)); MOCK_METHOD0(OnSentPluginChannelRequest, void()); MOCK_METHOD1(OnChannelOpened, void(const IPC::ChannelHandle& handle)); - MOCK_METHOD1(SetPluginInfo, void(const webkit::WebPluginInfo& info)); + MOCK_METHOD1(SetPluginInfo, void(const WebPluginInfo& info)); MOCK_METHOD0(OnError, void()); bool get_resource_context_called() const { @@ -257,7 +257,7 @@ class MockCanceledBeforeSentPluginProcessHostClient virtual ~MockCanceledBeforeSentPluginProcessHostClient() {} // Client implementation. - virtual void SetPluginInfo(const webkit::WebPluginInfo& info) OVERRIDE { + virtual void SetPluginInfo(const WebPluginInfo& info) OVERRIDE { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); ASSERT_TRUE(info.mime_types.size()); ASSERT_EQ(kNPAPITestPluginMimeType, info.mime_types[0].mime_type); diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index c8882c9..5f71dac 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -46,6 +46,7 @@ #include "content/public/common/content_switches.h" #include "content/public/common/context_menu_params.h" #include "content/public/common/url_constants.h" +#include "content/public/common/webplugininfo.h" #include "ipc/ipc_channel_handle.h" #include "ipc/ipc_platform_file.h" #include "media/audio/audio_manager.h" @@ -64,7 +65,6 @@ #include "third_party/WebKit/public/web/WebNotificationPresenter.h" #include "ui/gfx/color_profile.h" #include "webkit/plugins/plugin_constants.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_MACOSX) #include "content/common/mac/font_descriptor.h" @@ -242,7 +242,7 @@ class RenderMessageFilter::OpenChannelToNpapiPluginCallback return false; } - virtual void SetPluginInfo(const webkit::WebPluginInfo& info) OVERRIDE { + virtual void SetPluginInfo(const WebPluginInfo& info) OVERRIDE { info_ = info; } @@ -284,7 +284,7 @@ class RenderMessageFilter::OpenChannelToNpapiPluginCallback } ResourceContext* context_; - webkit::WebPluginInfo info_; + WebPluginInfo info_; PluginProcessHost* host_; bool sent_plugin_channel_request_; }; @@ -667,16 +667,16 @@ void RenderMessageFilter::OnGetPlugins( void RenderMessageFilter::GetPluginsCallback( IPC::Message* reply_msg, - const std::vector<webkit::WebPluginInfo>& all_plugins) { + const std::vector<WebPluginInfo>& all_plugins) { // Filter the plugin list. PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter(); - std::vector<webkit::WebPluginInfo> plugins; + std::vector<WebPluginInfo> plugins; int child_process_id = -1; int routing_id = MSG_ROUTING_NONE; for (size_t i = 0; i < all_plugins.size(); ++i) { // Copy because the filter can mutate. - webkit::WebPluginInfo plugin(all_plugins[i]); + WebPluginInfo plugin(all_plugins[i]); if (!filter || filter->IsPluginAvailable(child_process_id, routing_id, resource_context_, @@ -697,7 +697,7 @@ void RenderMessageFilter::OnGetPluginInfo( const GURL& page_url, const std::string& mime_type, bool* found, - webkit::WebPluginInfo* info, + WebPluginInfo* info, std::string* actual_mime_type) { bool allow_wildcard = true; *found = plugin_service_->GetPluginInfo( diff --git a/content/browser/renderer_host/render_message_filter.h b/content/browser/renderer_host/render_message_filter.h index f94ae0f..f726244 100644 --- a/content/browser/renderer_host/render_message_filter.h +++ b/content/browser/renderer_host/render_message_filter.h @@ -64,10 +64,6 @@ class URLRequestContext; class URLRequestContextGetter; } -namespace webkit { -struct WebPluginInfo; -} - namespace content { class BrowserContext; class DOMStorageContextImpl; @@ -77,6 +73,7 @@ class RenderWidgetHelper; class ResourceContext; class ResourceDispatcherHostImpl; struct Referrer; +struct WebPluginInfo; // This class filters out incoming IPC messages for the renderer process on the // IPC thread. @@ -162,13 +159,13 @@ class RenderMessageFilter : public BrowserMessageFilter { void OnGetPlugins(bool refresh, IPC::Message* reply_msg); void GetPluginsCallback(IPC::Message* reply_msg, - const std::vector<webkit::WebPluginInfo>& plugins); + const std::vector<WebPluginInfo>& plugins); void OnGetPluginInfo(int routing_id, const GURL& url, const GURL& policy_url, const std::string& mime_type, bool* found, - webkit::WebPluginInfo* info, + WebPluginInfo* info, std::string* actual_mime_type); void OnOpenChannelToPlugin(int routing_id, const GURL& url, diff --git a/content/child/npapi/plugin_host.cc b/content/child/npapi/plugin_host.cc index c543301..d495db6 100644 --- a/content/child/npapi/plugin_host.cc +++ b/content/child/npapi/plugin_host.cc @@ -17,6 +17,7 @@ #include "content/child/npapi/plugin_lib.h" #include "content/child/npapi/plugin_stream_url.h" #include "content/child/npapi/webplugin_delegate.h" +#include "content/public/common/webplugininfo.h" #include "net/base/net_util.h" #include "third_party/WebKit/public/web/WebBindings.h" #include "third_party/WebKit/public/web/WebKit.h" @@ -25,7 +26,6 @@ #include "ui/gl/gl_implementation.h" #include "ui/gl/gl_surface.h" #include "webkit/common/user_agent/user_agent.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_MACOSX) #include "base/mac/mac_util.h" diff --git a/content/child/npapi/plugin_lib.cc b/content/child/npapi/plugin_lib.cc index 13d743b..aa16b08 100644 --- a/content/child/npapi/plugin_lib.cc +++ b/content/child/npapi/plugin_lib.cc @@ -33,7 +33,7 @@ PluginLib* PluginLib::CreatePluginLib(const base::FilePath& filename) { return (*g_loaded_libs)[i].get(); } - webkit::WebPluginInfo info; + WebPluginInfo info; if (!PluginList::Singleton()->ReadPluginInfo(filename, &info)) return NULL; @@ -63,7 +63,7 @@ void PluginLib::ShutdownAllPlugins() { } } -PluginLib::PluginLib(const webkit::WebPluginInfo& info) +PluginLib::PluginLib(const WebPluginInfo& info) : web_plugin_info_(info), library_(NULL), initialized_(false), diff --git a/content/child/npapi/plugin_lib.h b/content/child/npapi/plugin_lib.h index 9d71353..382e281 100644 --- a/content/child/npapi/plugin_lib.h +++ b/content/child/npapi/plugin_lib.h @@ -14,8 +14,8 @@ #include "build/build_config.h" #include "content/child/npapi/webplugin.h" #include "content/common/content_export.h" +#include "content/public/common/webplugininfo.h" #include "third_party/npapi/bindings/nphostapi.h" -#include "webkit/plugins/webplugininfo.h" namespace base { class FilePath; @@ -60,7 +60,7 @@ class CONTENT_EXPORT PluginLib : public base::RefCounted<PluginLib> { // Gets information about this plugin and the mime types that it // supports. - const webkit::WebPluginInfo& plugin_info() { return web_plugin_info_; } + const WebPluginInfo& plugin_info() { return web_plugin_info_; } // // NPAPI functions @@ -96,7 +96,7 @@ class CONTENT_EXPORT PluginLib : public base::RefCounted<PluginLib> { friend class base::RefCounted<PluginLib>; // Creates a new PluginLib. - explicit PluginLib(const webkit::WebPluginInfo& info); + explicit PluginLib(const WebPluginInfo& info); virtual ~PluginLib(); @@ -111,7 +111,7 @@ class CONTENT_EXPORT PluginLib : public base::RefCounted<PluginLib> { void Shutdown(); private: - webkit::WebPluginInfo web_plugin_info_; // Supported mime types, description + 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/content/child/npapi/plugin_lib_unittest.cc b/content/child/npapi/plugin_lib_unittest.cc index 2193b8d..0438ead 100644 --- a/content/child/npapi/plugin_lib_unittest.cc +++ b/content/child/npapi/plugin_lib_unittest.cc @@ -16,7 +16,7 @@ namespace content { // variable, we can get a crash if no plugin libs were marked as always loaded. class PluginLibTest : public PluginLib { public: - PluginLibTest() : PluginLib(webkit::WebPluginInfo()) {} + PluginLibTest() : PluginLib(WebPluginInfo()) {} using PluginLib::Unload; protected: diff --git a/content/child/npapi/webplugin_delegate_impl_mac.mm b/content/child/npapi/webplugin_delegate_impl_mac.mm index 31b5966..eceaeb0 100644 --- a/content/child/npapi/webplugin_delegate_impl_mac.mm +++ b/content/child/npapi/webplugin_delegate_impl_mac.mm @@ -31,7 +31,6 @@ using WebKit::WebKeyboardEvent; using WebKit::WebInputEvent; using WebKit::WebMouseEvent; using WebKit::WebMouseWheelEvent; -using webkit::WebPluginInfo; // Important implementation notes: The Mac definition of NPAPI, particularly // the distinction between windowed and windowless modes, differs from the diff --git a/content/child/npapi/webplugin_delegate_impl_win.cc b/content/child/npapi/webplugin_delegate_impl_win.cc index d47d2fd..1ac124f 100644 --- a/content/child/npapi/webplugin_delegate_impl_win.cc +++ b/content/child/npapi/webplugin_delegate_impl_win.cc @@ -38,7 +38,6 @@ using WebKit::WebKeyboardEvent; using WebKit::WebInputEvent; using WebKit::WebMouseEvent; -using webkit::WebPluginInfo; namespace content { @@ -188,8 +187,7 @@ std::wstring GetKeyPath(HKEY key) { int GetPluginMajorVersion(const WebPluginInfo& plugin_info) { Version plugin_version; - webkit::WebPluginInfo::CreateVersionFromString( - plugin_info.version, &plugin_version); + WebPluginInfo::CreateVersionFromString(plugin_info.version, &plugin_version); int major_version = 0; if (plugin_version.IsValid()) diff --git a/content/common/pepper_plugin_registry.cc b/content/common/pepper_plugin_registry.cc index 21ae626..44bc6a0 100644 --- a/content/common/pepper_plugin_registry.cc +++ b/content/common/pepper_plugin_registry.cc @@ -13,8 +13,6 @@ #include "content/public/common/content_switches.h" #include "ppapi/shared_impl/ppapi_permissions.h" -using webkit::WebPluginInfo; - namespace content { namespace { @@ -66,9 +64,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::WebPluginMimeType mime_type(parts[j], - std::string(), - plugin.description); + WebPluginMimeType mime_type(parts[j], + std::string(), + plugin.description); plugin.mime_types.push_back(mime_type); } @@ -85,7 +83,7 @@ void ComputePluginsFromCommandLine(std::vector<PepperPluginInfo>* plugins) { } // namespace -bool MakePepperPluginInfo(const webkit::WebPluginInfo& webplugin_info, +bool MakePepperPluginInfo(const WebPluginInfo& webplugin_info, PepperPluginInfo* pepper_info) { if (!webplugin_info.is_pepper_plugin()) return false; @@ -94,7 +92,7 @@ bool MakePepperPluginInfo(const webkit::WebPluginInfo& webplugin_info, webplugin_info.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS || webplugin_info.type == WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED; pepper_info->is_sandboxed = webplugin_info.type != - webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED; + WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED; pepper_info->path = base::FilePath(webplugin_info.path); pepper_info->name = UTF16ToASCII(webplugin_info.name); @@ -140,7 +138,7 @@ void PepperPluginRegistry::PreloadModules() { } const PepperPluginInfo* PepperPluginRegistry::GetInfoForPlugin( - const webkit::WebPluginInfo& info) { + const WebPluginInfo& info) { for (size_t i = 0; i < plugin_list_.size(); ++i) { if (info.path == plugin_list_[i].path) return &plugin_list_[i]; diff --git a/content/common/pepper_plugin_registry.h b/content/common/pepper_plugin_registry.h index de9e8b2..b40f00b 100644 --- a/content/common/pepper_plugin_registry.h +++ b/content/common/pepper_plugin_registry.h @@ -16,7 +16,7 @@ namespace content { // Constructs a PepperPluginInfo from a WebPluginInfo. Returns false if // the operation is not possible, in particular the WebPluginInfo::type // must be one of the pepper types. -bool MakePepperPluginInfo(const webkit::WebPluginInfo& webplugin_info, +bool MakePepperPluginInfo(const WebPluginInfo& webplugin_info, PepperPluginInfo* pepper_info); // This class holds references to all of the known pepper plugin modules. @@ -49,7 +49,7 @@ class PepperPluginRegistry // return value will be NULL if there is no such plugin. // // The returned pointer is owned by the PluginRegistry. - const PepperPluginInfo* GetInfoForPlugin(const webkit::WebPluginInfo& info); + const PepperPluginInfo* GetInfoForPlugin(const WebPluginInfo& info); // Returns an existing loaded module for the given path. It will search for // both preloaded in-process or currently active (non crashed) out-of-process diff --git a/content/common/plugin_list.cc b/content/common/plugin_list.cc index 13c1aa5..615ca26 100644 --- a/content/common/plugin_list.cc +++ b/content/common/plugin_list.cc @@ -21,9 +21,6 @@ #include "content/common/plugin_constants_win.h" #endif -using webkit::WebPluginInfo; -using webkit::WebPluginMimeType; - namespace content { namespace { @@ -100,7 +97,7 @@ void PluginList::AddExtraPluginDir(const base::FilePath& plugin_dir) { #endif } -void PluginList::RegisterInternalPlugin(const webkit::WebPluginInfo& info, +void PluginList::RegisterInternalPlugin(const WebPluginInfo& info, bool add_at_beginning) { base::AutoLock lock(lock_); @@ -126,11 +123,10 @@ void PluginList::UnregisterInternalPlugin(const base::FilePath& path) { } void PluginList::GetInternalPlugins( - std::vector<webkit::WebPluginInfo>* internal_plugins) { + std::vector<WebPluginInfo>* internal_plugins) { base::AutoLock lock(lock_); - for (std::vector<webkit::WebPluginInfo>::iterator it = - internal_plugins_.begin(); + for (std::vector<WebPluginInfo>::iterator it = internal_plugins_.begin(); it != internal_plugins_.end(); ++it) { internal_plugins->push_back(*it); @@ -138,7 +134,7 @@ void PluginList::GetInternalPlugins( } bool PluginList::ReadPluginInfo(const base::FilePath& filename, - webkit::WebPluginInfo* info) { + WebPluginInfo* info) { { base::AutoLock lock(lock_); for (size_t i = 0; i < internal_plugins_.size(); ++i) { @@ -157,7 +153,7 @@ bool PluginList::ParseMimeTypes( const std::string& mime_types_str, const std::string& file_extensions_str, const base::string16& mime_type_descriptions_str, - std::vector<webkit::WebPluginMimeType>* parsed_mime_types) { + std::vector<WebPluginMimeType>* parsed_mime_types) { std::vector<std::string> mime_types, file_extensions; std::vector<base::string16> descriptions; base::SplitString(mime_types_str, '|', &mime_types); @@ -210,7 +206,7 @@ void PluginList::LoadPlugins(bool include_npapi) { loading_state_ = LOADING_STATE_REFRESHING; } - std::vector<webkit::WebPluginInfo> new_plugins; + std::vector<WebPluginInfo> new_plugins; base::Closure will_load_callback; { base::AutoLock lock(lock_); @@ -240,7 +236,7 @@ void PluginList::LoadPlugins(bool include_npapi) { bool PluginList::LoadPluginIntoPluginList( const base::FilePath& path, - std::vector<webkit::WebPluginInfo>* plugins, + std::vector<WebPluginInfo>* plugins, WebPluginInfo* plugin_info) { LOG_IF(ERROR, PluginList::DebugPluginLoading()) << "Loading plugin " << path.value(); @@ -305,7 +301,7 @@ void PluginList::GetPluginPathsToLoad(std::vector<base::FilePath>* plugin_paths, } } -void PluginList::SetPlugins(const std::vector<webkit::WebPluginInfo>& plugins) { +void PluginList::SetPlugins(const std::vector<WebPluginInfo>& plugins) { base::AutoLock lock(lock_); DCHECK_NE(LOADING_STATE_REFRESHING, loading_state_); @@ -327,8 +323,7 @@ void PluginList::GetPlugins(std::vector<WebPluginInfo>* plugins, plugins->insert(plugins->end(), plugins_list_.begin(), plugins_list_.end()); } -bool PluginList::GetPluginsNoRefresh( - std::vector<webkit::WebPluginInfo>* plugins) { +bool PluginList::GetPluginsNoRefresh(std::vector<WebPluginInfo>* plugins) { base::AutoLock lock(lock_); plugins->insert(plugins->end(), plugins_list_.begin(), plugins_list_.end()); @@ -341,7 +336,7 @@ void PluginList::GetPluginInfoArray( bool allow_wildcard, bool* use_stale, bool include_npapi, - std::vector<webkit::WebPluginInfo>* info, + std::vector<WebPluginInfo>* info, std::vector<std::string>* actual_mime_types) { DCHECK(mime_type == StringToLowerASCII(mime_type)); DCHECK(info); @@ -389,7 +384,7 @@ void PluginList::GetPluginInfoArray( } } -bool PluginList::SupportsType(const webkit::WebPluginInfo& plugin, +bool PluginList::SupportsType(const WebPluginInfo& plugin, const std::string& mime_type, bool allow_wildcard) { // Webkit will ask for a plugin to handle empty mime types. @@ -397,7 +392,7 @@ bool PluginList::SupportsType(const webkit::WebPluginInfo& plugin, return false; for (size_t i = 0; i < plugin.mime_types.size(); ++i) { - const webkit::WebPluginMimeType& mime_info = plugin.mime_types[i]; + const WebPluginMimeType& mime_info = plugin.mime_types[i]; if (net::MatchesMimeType(mime_info.mime_type, mime_type)) { if (!allow_wildcard && mime_info.mime_type == "*") continue; @@ -407,11 +402,11 @@ bool PluginList::SupportsType(const webkit::WebPluginInfo& plugin, return false; } -bool PluginList::SupportsExtension(const webkit::WebPluginInfo& plugin, +bool PluginList::SupportsExtension(const WebPluginInfo& plugin, const std::string& extension, std::string* actual_mime_type) { for (size_t i = 0; i < plugin.mime_types.size(); ++i) { - const webkit::WebPluginMimeType& mime_type = plugin.mime_types[i]; + const 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/content/common/plugin_list.h b/content/common/plugin_list.h index 5599bc9..9a5ef86 100644 --- a/content/common/plugin_list.h +++ b/content/common/plugin_list.h @@ -18,7 +18,7 @@ #include "base/memory/scoped_vector.h" #include "base/synchronization/lock.h" #include "content/common/content_export.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" class GURL; @@ -44,7 +44,7 @@ class CONTENT_EXPORT PluginList { // Returns true if the plugin supports |mime_type|. |mime_type| should be all // lower case. - static bool SupportsType(const webkit::WebPluginInfo& plugin, + static bool SupportsType(const WebPluginInfo& plugin, const std::string& mime_type, bool allow_wildcard); @@ -72,7 +72,7 @@ class CONTENT_EXPORT PluginList { // be loaded using PluginList::LoadPlugin(). // If |add_at_beginning| is true the plugin will be added earlier in // the list so that it can override the MIME types of older registrations. - void RegisterInternalPlugin(const webkit::WebPluginInfo& info, + void RegisterInternalPlugin(const WebPluginInfo& info, bool add_at_beginning); // Removes a specified internal plugin from the list. The search will match @@ -80,13 +80,13 @@ class CONTENT_EXPORT PluginList { void UnregisterInternalPlugin(const base::FilePath& path); // Gets a list of all the registered internal plugins. - void GetInternalPlugins(std::vector<webkit::WebPluginInfo>* plugins); + void GetInternalPlugins(std::vector<WebPluginInfo>* plugins); // 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. bool ReadPluginInfo(const base::FilePath& filename, - webkit::WebPluginInfo* info); + WebPluginInfo* info); // In Windows plugins, the mime types are passed as a specially formatted list // of strings. This function parses those strings into a WebPluginMimeType @@ -96,16 +96,15 @@ class CONTENT_EXPORT PluginList { const std::string& mime_types, const std::string& file_extensions, const base::string16& mime_type_descriptions, - std::vector<webkit::WebPluginMimeType>* parsed_mime_types); + std::vector<WebPluginMimeType>* parsed_mime_types); // Get all the plugins synchronously, loading them if necessary. - void GetPlugins(std::vector<webkit::WebPluginInfo>* plugins, + void GetPlugins(std::vector<WebPluginInfo>* plugins, bool include_npapi); // Copies the list of plug-ins into |plugins| without loading them. // Returns true if the list of plugins is up-to-date. - bool GetPluginsNoRefresh( - std::vector<webkit::WebPluginInfo>* plugins); + bool GetPluginsNoRefresh(std::vector<WebPluginInfo>* plugins); // Returns a list in |info| containing plugins that are found for // the given url and mime type (including disabled plugins, for @@ -124,14 +123,14 @@ class CONTENT_EXPORT PluginList { bool allow_wildcard, bool* use_stale, bool include_npapi, - std::vector<webkit::WebPluginInfo>* info, + std::vector<WebPluginInfo>* info, std::vector<std::string>* actual_mime_types); // Load a specific plugin with full path. Return true iff loading the plug-in // was successful. bool LoadPluginIntoPluginList(const base::FilePath& filename, - std::vector<webkit::WebPluginInfo>* plugins, - webkit::WebPluginInfo* plugin_info); + std::vector<WebPluginInfo>* plugins, + WebPluginInfo* plugin_info); // The following functions are used to support probing for WebPluginInfo // using a different instance of this class. @@ -141,7 +140,7 @@ class CONTENT_EXPORT PluginList { bool include_npapi); // Clears the internal list of Plugins and copies them from the vector. - void SetPlugins(const std::vector<webkit::WebPluginInfo>& plugins); + void SetPlugins(const std::vector<WebPluginInfo>& plugins); void set_will_load_plugins_callback(const base::Closure& callback); @@ -151,18 +150,18 @@ class CONTENT_EXPORT PluginList { // 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 base::FilePath& filename, - webkit::WebPluginInfo* info); + 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<webkit::WebPluginMimeType>* mime_types); + std::vector<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, - webkit::WebPluginInfo* info); + WebPluginInfo* info); #endif private: @@ -188,15 +187,14 @@ class CONTENT_EXPORT 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 ShouldLoadPluginUsingPluginList( - const webkit::WebPluginInfo& info, - std::vector<webkit::WebPluginInfo>* plugins); + bool ShouldLoadPluginUsingPluginList(const WebPluginInfo& info, + std::vector<WebPluginInfo>* plugins); // Returns true if the given plugin supports a given file extension. // |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 webkit::WebPluginInfo& plugin, + bool SupportsExtension(const WebPluginInfo& plugin, const std::string& extension, std::string* actual_mime_type); // @@ -225,10 +223,10 @@ class CONTENT_EXPORT PluginList { std::vector<base::FilePath> extra_plugin_dirs_; // Holds information about internal plugins. - std::vector<webkit::WebPluginInfo> internal_plugins_; + std::vector<WebPluginInfo> internal_plugins_; // A list holding all plug-ins. - std::vector<webkit::WebPluginInfo> plugins_list_; + std::vector<WebPluginInfo> plugins_list_; // Callback that is invoked whenever the PluginList will reload the plugins. base::Closure will_load_plugins_callback_; diff --git a/content/common/plugin_list_mac.mm b/content/common/plugin_list_mac.mm index 2048b6f..fc4813a 100644 --- a/content/common/plugin_list_mac.mm +++ b/content/common/plugin_list_mac.mm @@ -20,8 +20,6 @@ #include "base/strings/utf_string_conversions.h" using base::ScopedCFTypeRef; -using webkit::WebPluginInfo; -using webkit::WebPluginMimeType; namespace content { @@ -298,7 +296,7 @@ void PluginList::GetPluginsInDir( bool PluginList::ShouldLoadPluginUsingPluginList( const WebPluginInfo& info, - std::vector<webkit::WebPluginInfo>* plugins) { + std::vector<WebPluginInfo>* plugins) { return !IsBlacklistedPlugin(info); } diff --git a/content/common/plugin_list_posix.cc b/content/common/plugin_list_posix.cc index a8dd510..251fe39 100644 --- a/content/common/plugin_list_posix.cc +++ b/content/common/plugin_list_posix.cc @@ -35,9 +35,6 @@ // happy. #include "base/third_party/nspr/prcpucfg_linux.h" -using webkit::WebPluginInfo; -using webkit::WebPluginMimeType; - namespace content { namespace { @@ -564,7 +561,7 @@ void PluginList::GetPluginsInDir( } bool PluginList::ShouldLoadPluginUsingPluginList( - const WebPluginInfo& info, std::vector<webkit::WebPluginInfo>* plugins) { + const WebPluginInfo& info, std::vector<WebPluginInfo>* plugins) { LOG_IF(ERROR, PluginList::DebugPluginLoading()) << "Considering " << info.path.value() << " (" << info.name << ")"; diff --git a/content/common/plugin_list_unittest.cc b/content/common/plugin_list_unittest.cc index 4a1bd71..342200e 100644 --- a/content/common/plugin_list_unittest.cc +++ b/content/common/plugin_list_unittest.cc @@ -8,9 +8,6 @@ #include "base/strings/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" -using webkit::WebPluginInfo; -using webkit::WebPluginMimeType; - namespace content { namespace { diff --git a/content/common/plugin_list_win.cc b/content/common/plugin_list_win.cc index fe5e325..aa2e4e9 100644 --- a/content/common/plugin_list_win.cc +++ b/content/common/plugin_list_win.cc @@ -22,8 +22,7 @@ #include "base/win/windows_version.h" #include "content/common/plugin_constants_win.h" -using webkit::WebPluginInfo; - +namespace content { namespace { const char16 kRegistryApps[] = @@ -220,8 +219,8 @@ bool IsValid32BitImage(const base::FilePath& path) { // 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 webkit::WebPluginInfo& plugin1, - const webkit::WebPluginInfo& plugin2) { +bool HaveSharedMimeType(const WebPluginInfo& plugin1, + const 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) @@ -259,10 +258,8 @@ bool IsNewerVersion(const base::string16& a, const base::string16& b) { } // namespace -namespace content { - bool PluginList::ReadWebPluginInfo(const base::FilePath& filename, - webkit::WebPluginInfo* info) { + WebPluginInfo* info) { // On windows, the way we get the mime types for the library is // to check the version information in the DLL itself. This // will be a string of the format: <type1>|<type2>|<type3>|... @@ -373,8 +370,8 @@ void PluginList::GetPluginPathsFromRegistry( } bool PluginList::ShouldLoadPluginUsingPluginList( - const webkit::WebPluginInfo& info, - std::vector<webkit::WebPluginInfo>* plugins) { + const WebPluginInfo& info, + std::vector<WebPluginInfo>* plugins) { // Version check for (size_t j = 0; j < plugins->size(); ++j) { base::FilePath::StringType plugin1 = diff --git a/content/common/utility_messages.h b/content/common/utility_messages.h index 01aaa7c..1e5c68b 100644 --- a/content/common/utility_messages.h +++ b/content/common/utility_messages.h @@ -10,8 +10,8 @@ #include "base/basictypes.h" #include "content/common/content_export.h" #include "content/public/common/common_param_traits.h" +#include "content/public/common/webplugininfo.h" #include "ipc/ipc_message_macros.h" -#include "webkit/plugins/webplugininfo.h" #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT @@ -48,5 +48,5 @@ IPC_SYNC_MESSAGE_CONTROL2_0(UtilityHostMsg_LoadPluginFailed, // Notifies the browser that a plugin in the vector sent by it has been loaded. IPC_SYNC_MESSAGE_CONTROL2_0(UtilityHostMsg_LoadedPlugin, uint32_t /* index in the vector */, - webkit::WebPluginInfo /* plugin info */) + content::WebPluginInfo /* plugin info */) #endif // OS_POSIX diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 4fbf80c..96437be 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h @@ -1679,7 +1679,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::WebPluginInfo> /* plugins */) + std::vector<content::WebPluginInfo> /* plugins */) // Return information about a plugin for the given URL and MIME // type. If there is no matching plugin, |found| is false. @@ -1691,7 +1691,7 @@ IPC_SYNC_MESSAGE_CONTROL4_3(ViewHostMsg_GetPluginInfo, GURL /* page_url */, std::string /* mime_type */, bool /* found */, - webkit::WebPluginInfo /* plugin info */, + content::WebPluginInfo /* plugin info */, std::string /* actual_mime_type */) // A renderer sends this to the browser process when it wants to @@ -1704,7 +1704,7 @@ IPC_SYNC_MESSAGE_CONTROL4_2(ViewHostMsg_OpenChannelToPlugin, GURL /* page_url */, std::string /* mime_type */, IPC::ChannelHandle /* channel_handle */, - webkit::WebPluginInfo /* info */) + content::WebPluginInfo /* info */) #if defined(OS_WIN) IPC_MESSAGE_ROUTED1(ViewHostMsg_WindowlessPluginDummyWindowCreated, diff --git a/webkit/plugins/webplugininfo_unittest.cc b/content/common/webplugininfo_unittest.cc index 11da25a..fdf669d 100644 --- a/webkit/plugins/webplugininfo_unittest.cc +++ b/content/common/webplugininfo_unittest.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" #include <string> #include <vector> @@ -12,7 +12,7 @@ #include "base/version.h" #include "testing/gtest/include/gtest/gtest.h" -namespace webkit { +namespace content { TEST(PluginUtilsTest, VersionExtraction) { // Some real-world plugin versions (spaces, commata, parentheses, 'r', oh my) @@ -40,4 +40,4 @@ TEST(PluginUtilsTest, VersionExtraction) { } } -} // namespace webkit +} // namespace content diff --git a/content/content_common.gypi b/content/content_common.gypi index 7ffdc1c..50fbff2 100644 --- a/content/content_common.gypi +++ b/content/content_common.gypi @@ -99,6 +99,8 @@ 'public/common/url_fetcher.h', 'public/common/url_utils.cc', 'public/common/url_utils.h', + 'public/common/webplugininfo.cc', + 'public/common/webplugininfo.h', 'public/common/zygote_fork_delegate_linux.h', 'common/accessibility_messages.h', 'common/accessibility_notification.h', diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 6c47463..92a88f7 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -405,6 +405,7 @@ 'common/sandbox_mac_system_access_unittest.mm', 'common/sandbox_mac_unittest_helper.h', 'common/sandbox_mac_unittest_helper.mm', + 'common/webplugininfo_unittest.cc', 'renderer/active_notification_tracker_unittest.cc', 'renderer/android/email_detector_unittest.cc', 'renderer/android/phone_number_detector_unittest.cc', @@ -541,7 +542,6 @@ '../webkit/plugins/ppapi/ppapi_unittest.h', '../webkit/plugins/ppapi/quota_file_io_unittest.cc', '../webkit/plugins/ppapi/v8_var_converter_unittest.cc', - '../webkit/plugins/webplugininfo_unittest.cc', '../webkit/browser/quota/mock_quota_manager.cc', '../webkit/browser/quota/mock_quota_manager.h', '../webkit/browser/quota/mock_quota_manager_unittest.cc', diff --git a/content/public/browser/plugin_data_remover.h b/content/public/browser/plugin_data_remover.h index 6c39e3d..02d3acd 100644 --- a/content/public/browser/plugin_data_remover.h +++ b/content/public/browser/plugin_data_remover.h @@ -14,11 +14,8 @@ namespace base { class WaitableEvent; } -namespace webkit { -struct WebPluginInfo; -} - namespace content { +struct WebPluginInfo; class BrowserContext; @@ -33,7 +30,7 @@ class CONTENT_EXPORT PluginDataRemover { // Returns a list of all plug-ins that support removing LSO data. This method // will use cached plugin data. Call PluginService::GetPlugins() if the latest // data is needed. - static void GetSupportedPlugins(std::vector<webkit::WebPluginInfo>* plugins); + static void GetSupportedPlugins(std::vector<WebPluginInfo>* plugins); }; } // namespace content diff --git a/content/public/browser/plugin_service.h b/content/public/browser/plugin_service.h index 387752f..8c28948 100644 --- a/content/public/browser/plugin_service.h +++ b/content/public/browser/plugin_service.h @@ -18,10 +18,6 @@ namespace base { class FilePath; } -namespace webkit { -struct WebPluginInfo; -} - namespace content { class BrowserContext; @@ -29,6 +25,7 @@ class PluginProcessHost; class PluginServiceFilter; class ResourceContext; struct PepperPluginInfo; +struct WebPluginInfo; // This must be created on the main thread but it's only called on the IO/file // thread. This is an asynchronous wrapper around the PluginList interface for @@ -36,7 +33,7 @@ struct PepperPluginInfo; // doing expensive disk operations on the IO/UI threads. class PluginService { public: - typedef base::Callback<void(const std::vector<webkit::WebPluginInfo>&)> + typedef base::Callback<void(const std::vector<WebPluginInfo>&)> GetPluginsCallback; // Returns the PluginService singleton. @@ -66,7 +63,7 @@ class PluginService { const GURL& url, const std::string& mime_type, bool allow_wildcard, - std::vector<webkit::WebPluginInfo>* info, + std::vector<WebPluginInfo>* info, std::vector<std::string>* actual_mime_types) = 0; // Gets plugin info for an individual plugin and filters the plugins using @@ -80,14 +77,14 @@ class PluginService { const std::string& mime_type, bool allow_wildcard, bool* is_stale, - webkit::WebPluginInfo* info, + WebPluginInfo* info, std::string* actual_mime_type) = 0; // Get plugin info by plugin path (including disabled plugins). Returns true // if the plugin is found and WebPluginInfo has been filled in |info|. This // will use cached data in the plugin list. virtual bool GetPluginInfoByPath(const base::FilePath& plugin_path, - webkit::WebPluginInfo* info) = 0; + WebPluginInfo* info) = 0; // Returns the display name for the plugin identified by the given path. If // the path doesn't identify a plugin, or the plugin has no display name, @@ -132,7 +129,7 @@ class PluginService { // be loaded using PluginList::LoadPlugin(). // If |add_at_beginning| is true the plugin will be added earlier in // the list so that it can override the MIME types of older registrations. - virtual void RegisterInternalPlugin(const webkit::WebPluginInfo& info, + virtual void RegisterInternalPlugin(const WebPluginInfo& info, bool add_at_beginning) = 0; // Removes a specified internal plugin from the list. The search will match @@ -140,8 +137,7 @@ class PluginService { virtual void UnregisterInternalPlugin(const base::FilePath& path) = 0; // Gets a list of all the registered internal plugins. - virtual void GetInternalPlugins( - std::vector<webkit::WebPluginInfo>* plugins) = 0; + virtual void GetInternalPlugins(std::vector<WebPluginInfo>* plugins) = 0; // Returns true iff NPAPI plugins are supported on the current platform. // This can be called from any thread. diff --git a/content/public/browser/plugin_service_filter.h b/content/public/browser/plugin_service_filter.h index 5ec1961..8ff5503 100644 --- a/content/public/browser/plugin_service_filter.h +++ b/content/public/browser/plugin_service_filter.h @@ -11,11 +11,8 @@ namespace base { class FilePath; } -namespace webkit { -struct WebPluginInfo; -} - namespace content { +struct WebPluginInfo; // Callback class to let the client filter the list of all installed plug-ins // and block them from being loaded. @@ -31,7 +28,7 @@ class PluginServiceFilter { const void* context, const GURL& url, const GURL& policy_url, - webkit::WebPluginInfo* plugin) = 0; + WebPluginInfo* plugin) = 0; // Whether the renderer has permission to load available |plugin|. virtual bool CanLoadPlugin(int render_process_id, diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h index 3ac2bf1..e66daa7 100644 --- a/content/public/common/common_param_traits_macros.h +++ b/content/public/common/common_param_traits_macros.h @@ -13,6 +13,7 @@ #include "content/public/common/password_form.h" #include "content/public/common/security_style.h" #include "content/public/common/ssl_status.h" +#include "content/public/common/webplugininfo.h" #include "ipc/ipc_message_macros.h" #include "net/base/request_priority.h" #include "third_party/WebKit/public/platform/WebPoint.h" @@ -21,7 +22,6 @@ #include "third_party/WebKit/public/platform/WebURLRequest.h" #include "ui/base/window_open_disposition.h" #include "webkit/common/webpreferences.h" -#include "webkit/plugins/webplugininfo.h" #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT @@ -76,7 +76,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::SSLStatus) IPC_STRUCT_TRAITS_MEMBER(content_status) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(webkit::WebPluginMimeType) +IPC_STRUCT_TRAITS_BEGIN(content::WebPluginMimeType) IPC_STRUCT_TRAITS_MEMBER(mime_type) IPC_STRUCT_TRAITS_MEMBER(file_extensions) IPC_STRUCT_TRAITS_MEMBER(description) @@ -84,7 +84,7 @@ IPC_STRUCT_TRAITS_BEGIN(webkit::WebPluginMimeType) IPC_STRUCT_TRAITS_MEMBER(additional_param_values) IPC_STRUCT_TRAITS_END() -IPC_STRUCT_TRAITS_BEGIN(webkit::WebPluginInfo) +IPC_STRUCT_TRAITS_BEGIN(content::WebPluginInfo) IPC_STRUCT_TRAITS_MEMBER(name) IPC_STRUCT_TRAITS_MEMBER(path) IPC_STRUCT_TRAITS_MEMBER(version) diff --git a/content/public/common/pepper_plugin_info.cc b/content/public/common/pepper_plugin_info.cc index 4b94731..f8e88b2 100644 --- a/content/public/common/pepper_plugin_info.cc +++ b/content/public/common/pepper_plugin_info.cc @@ -18,14 +18,14 @@ PepperPluginInfo::PepperPluginInfo() PepperPluginInfo::~PepperPluginInfo() { } -webkit::WebPluginInfo PepperPluginInfo::ToWebPluginInfo() const { - webkit::WebPluginInfo info; +WebPluginInfo PepperPluginInfo::ToWebPluginInfo() const { + WebPluginInfo info; info.type = is_out_of_process ? (is_sandboxed ? - webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS : - webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED) : - webkit::WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS; + WebPluginInfo::PLUGIN_TYPE_PEPPER_OUT_OF_PROCESS : + WebPluginInfo::PLUGIN_TYPE_PEPPER_UNSANDBOXED) : + WebPluginInfo::PLUGIN_TYPE_PEPPER_IN_PROCESS; info.name = name.empty() ? path.BaseName().LossyDisplayName() : UTF8ToUTF16(name); diff --git a/content/public/common/pepper_plugin_info.h b/content/public/common/pepper_plugin_info.h index 87b4aa9..8106c6e 100644 --- a/content/public/common/pepper_plugin_info.h +++ b/content/public/common/pepper_plugin_info.h @@ -10,8 +10,8 @@ #include "base/files/file_path.h" #include "content/common/content_export.h" +#include "content/public/common/webplugininfo.h" #include "webkit/plugins/ppapi/plugin_module.h" -#include "webkit/plugins/webplugininfo.h" namespace content { @@ -19,7 +19,7 @@ struct CONTENT_EXPORT PepperPluginInfo { PepperPluginInfo(); ~PepperPluginInfo(); - webkit::WebPluginInfo ToWebPluginInfo() const; + 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 @@ -38,7 +38,7 @@ struct CONTENT_EXPORT PepperPluginInfo { std::string name; std::string description; std::string version; - std::vector<webkit::WebPluginMimeType> mime_types; + std::vector<WebPluginMimeType> mime_types; // When is_internal is set, this contains the function pointers to the // entry points for the internal plugins. diff --git a/webkit/plugins/webplugininfo.cc b/content/public/common/webplugininfo.cc index 1488307..fe2a02e 100644 --- a/webkit/plugins/webplugininfo.cc +++ b/content/public/common/webplugininfo.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" #include <algorithm> @@ -12,7 +12,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/version.h" -namespace webkit { +namespace content { WebPluginMimeType::WebPluginMimeType() {} @@ -100,4 +100,4 @@ void WebPluginInfo::CreateVersionFromString( *parsed_version = Version(no_leading_zeros_version); } -} // namespace webkit +} // namespace content diff --git a/webkit/plugins/webplugininfo.h b/content/public/common/webplugininfo.h index 0307eba..75b4033 100644 --- a/webkit/plugins/webplugininfo.h +++ b/content/public/common/webplugininfo.h @@ -2,22 +2,23 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef WEBKIT_PLUGINS_WEBPLUGININFO_H_ -#define WEBKIT_PLUGINS_WEBPLUGININFO_H_ +#ifndef CONTENT_PUBLIC_COMMON_WEBPLUGININFO_H_ +#define CONTENT_PUBLIC_COMMON_WEBPLUGININFO_H_ #include <string> #include <vector> #include "base/basictypes.h" #include "base/files/file_path.h" +#include "content/common/content_export.h" namespace base { class Version; } -namespace webkit { +namespace content { -struct WebPluginMimeType { +struct CONTENT_EXPORT WebPluginMimeType { WebPluginMimeType(); // A constructor for the common case of a single file extension and an ASCII // description. @@ -41,7 +42,7 @@ struct WebPluginMimeType { }; // Describes an available NPAPI or Pepper plugin. -struct WebPluginInfo { +struct CONTENT_EXPORT WebPluginInfo { enum PluginType { PLUGIN_TYPE_NPAPI, PLUGIN_TYPE_PEPPER_IN_PROCESS, @@ -93,6 +94,6 @@ struct WebPluginInfo { int32 pepper_permissions; }; -} // namespace webkit +} // namespace content -#endif // WEBKIT_PLUGINS_WEBPLUGININFO_H_ +#endif // CONTENT_PUBLIC_COMMON_WEBPLUGININFO_H_ diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h index 6b5a836..dd75eb17 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h @@ -51,13 +51,13 @@ namespace webkit { namespace ppapi { class PpapiInterfaceFactoryManager; } -struct WebPluginInfo; } namespace content { class RenderView; class SynchronousCompositor; +struct WebPluginInfo; // Embedder API for participating in renderer logic. class CONTENT_EXPORT ContentRendererClient { diff --git a/content/public/renderer/render_view.h b/content/public/renderer/render_view.h index 547e544..faacb32 100644 --- a/content/public/renderer/render_view.h +++ b/content/public/renderer/render_view.h @@ -31,16 +31,13 @@ namespace gfx { class Size; } -namespace webkit { -struct WebPluginInfo; -} - namespace content { class ContextMenuClient; class RenderViewVisitor; struct ContextMenuParams; struct SSLStatus; +struct WebPluginInfo; class CONTENT_EXPORT RenderView : public IPC::Sender { public: @@ -92,7 +89,7 @@ class CONTENT_EXPORT RenderView : public IPC::Sender { // plugin was found. virtual WebKit::WebPlugin* CreatePlugin( WebKit::WebFrame* frame, - const webkit::WebPluginInfo& info, + const WebPluginInfo& info, const WebKit::WebPluginParams& params) = 0; // Evaluates a string of JavaScript in a particular frame. diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc index e44aed1..d489f49 100644 --- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc +++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc @@ -35,6 +35,7 @@ #include "content/public/common/context_menu_params.h" #include "content/public/common/media_stream_request.h" #include "content/public/common/referrer.h" +#include "content/public/common/webplugininfo.h" #include "content/public/renderer/content_renderer_client.h" #include "content/public/renderer/renderer_restrict_dispatch_group.h" #include "content/renderer/gamepad_shared_memory_reader.h" @@ -101,7 +102,6 @@ #include "webkit/plugins/ppapi/ppb_tcp_server_socket_private_impl.h" #include "webkit/plugins/ppapi/ppb_tcp_socket_private_impl.h" #include "webkit/plugins/ppapi/resource_helper.h" -#include "webkit/plugins/webplugininfo.h" using WebKit::WebView; using WebKit::WebFrame; @@ -306,7 +306,7 @@ void DidFailOpenFileSystemURL( void CreateHostForInProcessModule(RenderViewImpl* render_view, webkit::ppapi::PluginModule* module, - const webkit::WebPluginInfo& webplugin_info) { + const WebPluginInfo& webplugin_info) { // First time an in-process plugin was used, make a host for it. const PepperPluginInfo* info = PepperPluginRegistry::GetInstance()->GetInfoForPlugin(webplugin_info); @@ -347,7 +347,7 @@ PepperPluginDelegateImpl::~PepperPluginDelegateImpl() { } WebKit::WebPlugin* PepperPluginDelegateImpl::CreatePepperWebPlugin( - const webkit::WebPluginInfo& webplugin_info, + const WebPluginInfo& webplugin_info, const WebKit::WebPluginParams& params) { bool pepper_plugin_was_registered = false; scoped_refptr<webkit::ppapi::PluginModule> pepper_module( @@ -365,7 +365,7 @@ WebKit::WebPlugin* PepperPluginDelegateImpl::CreatePepperWebPlugin( scoped_refptr<webkit::ppapi::PluginModule> PepperPluginDelegateImpl::CreatePepperPluginModule( - const webkit::WebPluginInfo& webplugin_info, + const WebPluginInfo& webplugin_info, bool* pepper_plugin_was_registered) { *pepper_plugin_was_registered = true; diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.h b/content/renderer/pepper/pepper_plugin_delegate_impl.h index 66b5ba8..139d892 100644 --- a/content/renderer/pepper/pepper_plugin_delegate_impl.h +++ b/content/renderer/pepper/pepper_plugin_delegate_impl.h @@ -41,7 +41,6 @@ class PpapiPermissions; } namespace webkit { -struct WebPluginInfo; namespace ppapi { class PluginInstance; class PluginModule; @@ -59,6 +58,7 @@ class GamepadSharedMemoryReader; class PepperBrokerImpl; class PepperDeviceEnumerationEventHandler; class RenderViewImpl; +struct WebPluginInfo; class PepperPluginDelegateImpl : public webkit::ppapi::PluginDelegate, @@ -114,7 +114,7 @@ class PepperPluginDelegateImpl private: // RenderViewPepperHelper implementation. virtual WebKit::WebPlugin* CreatePepperWebPlugin( - const webkit::WebPluginInfo& webplugin_info, + const WebPluginInfo& webplugin_info, const WebKit::WebPluginParams& params) OVERRIDE; virtual void ViewWillInitiatePaint() OVERRIDE; virtual void ViewInitiatedPaint() OVERRIDE; @@ -385,9 +385,8 @@ class PepperPluginDelegateImpl // |*pepper_plugin_was_registered| will be set to true and the caller should // not fall back on any other plugin types. scoped_refptr<webkit::ppapi::PluginModule> - CreatePepperPluginModule( - const webkit::WebPluginInfo& webplugin_info, - bool* pepper_plugin_was_registered); + CreatePepperPluginModule(const WebPluginInfo& webplugin_info, + bool* pepper_plugin_was_registered); // Asynchronously attempts to create a PPAPI broker for the given plugin. scoped_refptr<PepperBrokerImpl> CreateBroker( diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 59370f3..288b405 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -1134,7 +1134,7 @@ void RenderViewImpl::UnregisterPluginDelegate( bool RenderViewImpl::GetPluginInfo(const GURL& url, const GURL& page_url, const std::string& mime_type, - webkit::WebPluginInfo* plugin_info, + WebPluginInfo* plugin_info, std::string* actual_mime_type) { bool found = false; Send(new ViewHostMsg_GetPluginInfo( @@ -2830,7 +2830,7 @@ WebKit::WebPlugin* RenderViewImpl::createPlugin(WebFrame* frame, return GetBrowserPluginManager()->CreateBrowserPlugin(this, frame, params); } - webkit::WebPluginInfo info; + WebPluginInfo info; std::string mime_type; bool found = GetPluginInfo(params.url, frame->top()->document().url(), params.mimeType.utf8(), &info, &mime_type); @@ -4681,7 +4681,7 @@ bool RenderViewImpl::IsEditableNode(const WebNode& node) const { WebKit::WebPlugin* RenderViewImpl::CreatePlugin( WebKit::WebFrame* frame, - const webkit::WebPluginInfo& info, + const WebPluginInfo& info, const WebKit::WebPluginParams& params) { WebKit::WebPlugin* pepper_webplugin = pepper_helper_->CreatePepperWebPlugin(info, params); diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 3c4c3e9..6e0e87d0 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h @@ -347,7 +347,7 @@ class CONTENT_EXPORT RenderViewImpl bool GetPluginInfo(const GURL& url, const GURL& page_url, const std::string& mime_type, - webkit::WebPluginInfo* plugin_info, + WebPluginInfo* plugin_info, std::string* actual_mime_type); void TransferActiveWheelFlingAnimation( @@ -712,7 +712,7 @@ class CONTENT_EXPORT RenderViewImpl virtual bool IsEditableNode(const WebKit::WebNode& node) const OVERRIDE; virtual WebKit::WebPlugin* CreatePlugin( WebKit::WebFrame* frame, - const webkit::WebPluginInfo& info, + const WebPluginInfo& info, const WebKit::WebPluginParams& params) OVERRIDE; virtual void EvaluateScript(const string16& frame_xpath, const string16& jscript, diff --git a/content/renderer/render_view_pepper_helper.cc b/content/renderer/render_view_pepper_helper.cc index f69ca4f..c2f701b 100644 --- a/content/renderer/render_view_pepper_helper.cc +++ b/content/renderer/render_view_pepper_helper.cc @@ -12,7 +12,7 @@ RenderViewPepperHelper::~RenderViewPepperHelper() { } WebKit::WebPlugin* RenderViewPepperHelper::CreatePepperWebPlugin( - const webkit::WebPluginInfo& webplugin_info, + const WebPluginInfo& webplugin_info, const WebKit::WebPluginParams& params) { return NULL; } diff --git a/content/renderer/render_view_pepper_helper.h b/content/renderer/render_view_pepper_helper.h index 2a81945..14e22ef 100644 --- a/content/renderer/render_view_pepper_helper.h +++ b/content/renderer/render_view_pepper_helper.h @@ -31,7 +31,6 @@ class Range; } namespace webkit { -struct WebPluginInfo; namespace ppapi { class PluginInstance; } @@ -44,6 +43,7 @@ class WebPlugin; } namespace content { +struct WebPluginInfo; class CONTENT_EXPORT RenderViewPepperHelper { public: @@ -51,7 +51,7 @@ class CONTENT_EXPORT RenderViewPepperHelper { virtual ~RenderViewPepperHelper(); virtual WebKit::WebPlugin* CreatePepperWebPlugin( - const webkit::WebPluginInfo& webplugin_info, + const WebPluginInfo& webplugin_info, const WebKit::WebPluginParams& params); // Called by RenderView to implement the corresponding function in its base diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc index 320d7fe..e31e59e 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.cc +++ b/content/renderer/renderer_webkitplatformsupport_impl.cc @@ -27,6 +27,7 @@ #include "content/common/mime_registry_messages.h" #include "content/common/view_messages.h" #include "content/public/common/content_switches.h" +#include "content/public/common/webplugininfo.h" #include "content/public/renderer/content_renderer_client.h" #include "content/renderer/device_orientation/device_motion_event_pump.h" #include "content/renderer/dom_storage/webstoragenamespace_impl.h" @@ -67,7 +68,6 @@ #include "webkit/glue/simple_webmimeregistry_impl.h" #include "webkit/glue/webfileutilities_impl.h" #include "webkit/glue/webkit_glue.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_WIN) #include "content/common/child_process_messages.h" @@ -908,20 +908,20 @@ void RendererWebKitPlatformSupportImpl::getPluginList( bool refresh, WebKit::WebPluginListBuilder* builder) { #if defined(ENABLE_PLUGINS) - std::vector<webkit::WebPluginInfo> plugins; + std::vector<WebPluginInfo> plugins; if (!plugin_refresh_allowed_) refresh = false; RenderThread::Get()->Send( new ViewHostMsg_GetPlugins(refresh, &plugins)); for (size_t i = 0; i < plugins.size(); ++i) { - const webkit::WebPluginInfo& plugin = plugins[i]; + const WebPluginInfo& plugin = plugins[i]; builder->addPlugin( plugin.name, plugin.desc, plugin.path.BaseName().AsUTF16Unsafe()); for (size_t j = 0; j < plugin.mime_types.size(); ++j) { - const webkit::WebPluginMimeType& mime_type = plugin.mime_types[j]; + const WebPluginMimeType& mime_type = plugin.mime_types[j]; builder->addMediaTypeToLastPlugin( WebString::fromUTF8(mime_type.mime_type), mime_type.description); diff --git a/content/renderer/webplugin_delegate_proxy.cc b/content/renderer/webplugin_delegate_proxy.cc index 39972ab..687f19e 100644 --- a/content/renderer/webplugin_delegate_proxy.cc +++ b/content/renderer/webplugin_delegate_proxy.cc @@ -1186,7 +1186,7 @@ bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() { // The move networks plugin needs to be informed of geometry updates // synchronously. - std::vector<webkit::WebPluginMimeType>::iterator index; + std::vector<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 bc6d721..c0838a2 100644 --- a/content/renderer/webplugin_delegate_proxy.h +++ b/content/renderer/webplugin_delegate_proxy.h @@ -13,6 +13,7 @@ #include "base/memory/weak_ptr.h" #include "base/sequenced_task_runner_helpers.h" #include "content/child/npapi/webplugin_delegate.h" +#include "content/public/common/webplugininfo.h" #include "ipc/ipc_listener.h" #include "ipc/ipc_message.h" #include "ipc/ipc_sender.h" @@ -20,7 +21,6 @@ #include "ui/gfx/rect.h" #include "ui/surface/transport_dib.h" #include "url/gurl.h" -#include "webkit/plugins/webplugininfo.h" #if defined(OS_MACOSX) #include "base/containers/hash_tables.h" @@ -259,7 +259,7 @@ class WebPluginDelegateProxy scoped_refptr<PluginChannelHost> channel_host_; std::string mime_type_; int instance_id_; - webkit::WebPluginInfo info_; + WebPluginInfo info_; gfx::Rect plugin_rect_; gfx::Rect clip_rect_; diff --git a/content/shell/shell_plugin_service_filter.cc b/content/shell/shell_plugin_service_filter.cc index 31f080c..f164637 100644 --- a/content/shell/shell_plugin_service_filter.cc +++ b/content/shell/shell_plugin_service_filter.cc @@ -5,7 +5,7 @@ #include "content/shell/shell_plugin_service_filter.h" #include "base/strings/utf_string_conversions.h" -#include "webkit/plugins/webplugininfo.h" +#include "content/public/common/webplugininfo.h" namespace content { @@ -19,7 +19,7 @@ bool ShellPluginServiceFilter::IsPluginAvailable( const void* context, const GURL& url, const GURL& policy_url, - webkit::WebPluginInfo* plugin) { + WebPluginInfo* plugin) { return plugin->name == ASCIIToUTF16("WebKit Test PlugIn"); } diff --git a/content/shell/shell_plugin_service_filter.h b/content/shell/shell_plugin_service_filter.h index 81f8063..a489aff 100644 --- a/content/shell/shell_plugin_service_filter.h +++ b/content/shell/shell_plugin_service_filter.h @@ -22,7 +22,7 @@ class ShellPluginServiceFilter : public PluginServiceFilter { const void* context, const GURL& url, const GURL& policy_url, - webkit::WebPluginInfo* plugin) OVERRIDE; + WebPluginInfo* plugin) OVERRIDE; virtual bool CanLoadPlugin(int render_process_id, const base::FilePath& path) OVERRIDE; diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc index f0e483b..e02d172 100644 --- a/content/utility/utility_thread_impl.cc +++ b/content/utility/utility_thread_impl.cc @@ -143,12 +143,12 @@ void UtilityThreadImpl::OnLoadPlugins( gfx::GtkInitFromCommandLine(*CommandLine::ForCurrentProcess()); #endif - std::vector<webkit::WebPluginInfo> plugins; + std::vector<WebPluginInfo> plugins; // TODO(bauerb): If we restart loading plug-ins, we might mess up the logic in // PluginList::ShouldLoadPlugin due to missing the previously loaded plug-ins // in |plugin_groups|. for (size_t i = 0; i < plugin_paths.size(); ++i) { - webkit::WebPluginInfo plugin; + WebPluginInfo plugin; if (!plugin_list->LoadPluginIntoPluginList( plugin_paths[i], &plugins, &plugin)) Send(new UtilityHostMsg_LoadPluginFailed(i, plugin_paths[i])); diff --git a/webkit/plugins/webkit_plugins.gyp b/webkit/plugins/webkit_plugins.gyp index c4077a1..18fb10d 100644 --- a/webkit/plugins/webkit_plugins.gyp +++ b/webkit/plugins/webkit_plugins.gyp @@ -24,8 +24,6 @@ '<(DEPTH)/ui/ui.gyp:ui_resources', ], 'sources': [ - '../plugins/webplugininfo.cc', - '../plugins/webplugininfo.h', '../plugins/plugin_constants.cc', '../plugins/plugin_constants.h', '../plugins/plugin_switches.cc', |