diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 06:27:50 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-21 06:27:50 +0000 |
commit | 191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c (patch) | |
tree | b982048e66a62646694c16c2cb10cb7ad30d8912 /chrome/common | |
parent | cfef856dd2ccece3cea13ccc96ac9579fd2b30b5 (diff) | |
download | chromium_src-191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c.zip chromium_src-191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c.tar.gz chromium_src-191eb3f7ee90f8ce1d1bee4a37f3acee0c10068c.tar.bz2 |
Re-land earlier patch that moves the NPAPI implementation from webkit/glue/plugins to webkit/plugins/npapi
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69808 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/chrome_plugin_lib.cc | 4 | ||||
-rw-r--r-- | chrome/common/default_plugin.cc | 9 | ||||
-rw-r--r-- | chrome/common/gpu_plugin.cc | 14 | ||||
-rw-r--r-- | chrome/common/render_messages.cc | 34 | ||||
-rw-r--r-- | chrome/common/render_messages.h | 23 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 10 | ||||
-rw-r--r-- | chrome/common/render_messages_params.h | 4 |
7 files changed, 54 insertions, 44 deletions
diff --git a/chrome/common/chrome_plugin_lib.cc b/chrome/common/chrome_plugin_lib.cc index 3277f4a..1bd118b 100644 --- a/chrome/common/chrome_plugin_lib.cc +++ b/chrome/common/chrome_plugin_lib.cc @@ -19,7 +19,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/notification_service.h" #include "chrome/common/chrome_paths.h" -#include "webkit/glue/plugins/plugin_list.h" +#include "webkit/plugins/npapi/plugin_list.h" using base::TimeDelta; @@ -114,7 +114,7 @@ void ChromePluginLib::RegisterPluginsWithNPAPI() { FilePath path; // Register Gears, if available. if (PathService::Get(chrome::FILE_GEARS_PLUGIN, &path)) - NPAPI::PluginList::Singleton()->AddExtraPluginPath(path); + webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); } static void LogPluginLoadTime(const TimeDelta &time) { diff --git a/chrome/common/default_plugin.cc b/chrome/common/default_plugin.cc index bba738b..3337c7c 100644 --- a/chrome/common/default_plugin.cc +++ b/chrome/common/default_plugin.cc @@ -5,13 +5,13 @@ #include "chrome/common/default_plugin.h" #include "chrome/default_plugin/plugin_main.h" -#include "webkit/glue/plugins/plugin_list.h" +#include "webkit/plugins/npapi/plugin_list.h" namespace chrome { void RegisterInternalDefaultPlugin() { - const NPAPI::PluginVersionInfo default_plugin = { - FilePath(kDefaultPluginLibraryName), + const webkit::npapi::PluginVersionInfo default_plugin = { + FilePath(webkit::npapi::kDefaultPluginLibraryName), L"Default Plug-in", L"Provides functionality for installing third-party plug-ins", L"1", @@ -27,7 +27,8 @@ void RegisterInternalDefaultPlugin() { } }; - NPAPI::PluginList::Singleton()->RegisterInternalPlugin(default_plugin); + webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( + default_plugin); } } // namespace chrome diff --git a/chrome/common/gpu_plugin.cc b/chrome/common/gpu_plugin.cc index 84ab339..4600638 100644 --- a/chrome/common/gpu_plugin.cc +++ b/chrome/common/gpu_plugin.cc @@ -9,18 +9,15 @@ #include "base/utf_string_conversions.h" #include "chrome/common/chrome_switches.h" #include "gpu/gpu_plugin/gpu_plugin.h" -#include "webkit/glue/plugins/plugin_list.h" - -#if defined(ENABLE_GPU) -#include "webkit/glue/plugins/plugin_constants_win.h" -#endif +#include "webkit/plugins/npapi/plugin_list.h" namespace chrome { void RegisterInternalGPUPlugin() { #if defined(ENABLE_GPU) - static const std::wstring kWideMimeType = ASCIIToWide(kGPUPluginMimeType); - static const NPAPI::PluginVersionInfo kGPUPluginInfo = { + static const std::wstring kWideMimeType = ASCIIToWide( + "application/vnd.google.chrome.gpu-plugin"); + static const webkit::npapi::PluginVersionInfo kGPUPluginInfo = { FilePath(FILE_PATH_LITERAL("gpu-plugin")), L"GPU Plug-in", L"GPU Rendering Plug-in", @@ -38,7 +35,8 @@ void RegisterInternalGPUPlugin() { }; if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableGPUPlugin)) - NPAPI::PluginList::Singleton()->RegisterInternalPlugin(kGPUPluginInfo); + webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( + kGPUPluginInfo); #endif // ENABLE_GPU } diff --git a/chrome/common/render_messages.cc b/chrome/common/render_messages.cc index d0f8d4a..c865a68 100644 --- a/chrome/common/render_messages.cc +++ b/chrome/common/render_messages.cc @@ -23,12 +23,12 @@ #include "webkit/blob/blob_data.h" #include "webkit/glue/form_field.h" #include "webkit/glue/password_form.h" -#include "webkit/glue/plugins/webplugin.h" #include "webkit/glue/resource_loader_bridge.h" #include "webkit/glue/webaccessibility.h" #include "webkit/glue/webcookie.h" #include "webkit/glue/webcursor.h" #include "webkit/glue/webmenuitem.h" +#include "webkit/plugins/npapi/webplugin.h" #if defined(OS_MACOSX) #include "chrome/common/font_descriptor_mac.h" @@ -196,8 +196,8 @@ void ParamTraits<ContextMenuParams>::Log(const param_type& p, l->append("<ContextMenuParams>"); } -void ParamTraits<webkit_glue::WebPluginGeometry>::Write(Message* m, - const param_type& p) { +void ParamTraits<webkit::npapi::WebPluginGeometry>::Write(Message* m, + const param_type& p) { WriteParam(m, p.window); WriteParam(m, p.window_rect); WriteParam(m, p.clip_rect); @@ -206,7 +206,7 @@ void ParamTraits<webkit_glue::WebPluginGeometry>::Write(Message* m, WriteParam(m, p.visible); } -bool ParamTraits<webkit_glue::WebPluginGeometry>::Read( +bool ParamTraits<webkit::npapi::WebPluginGeometry>::Read( const Message* m, void** iter, param_type* p) { return ReadParam(m, iter, &p->window) && @@ -217,8 +217,8 @@ bool ParamTraits<webkit_glue::WebPluginGeometry>::Read( ReadParam(m, iter, &p->visible); } -void ParamTraits<webkit_glue::WebPluginGeometry>::Log(const param_type& p, - std::string* l) { +void ParamTraits<webkit::npapi::WebPluginGeometry>::Log(const param_type& p, + std::string* l) { l->append("("); LogParam(p.window, l); l->append(", "); @@ -234,21 +234,24 @@ void ParamTraits<webkit_glue::WebPluginGeometry>::Log(const param_type& p, l->append(")"); } -void ParamTraits<WebPluginMimeType>::Write(Message* m, const param_type& p) { +void ParamTraits<webkit::npapi::WebPluginMimeType>::Write(Message* m, + const param_type& p) { WriteParam(m, p.mime_type); WriteParam(m, p.file_extensions); WriteParam(m, p.description); } -bool ParamTraits<WebPluginMimeType>::Read(const Message* m, void** iter, - param_type* r) { +bool ParamTraits<webkit::npapi::WebPluginMimeType>::Read(const Message* m, + void** iter, + param_type* r) { return ReadParam(m, iter, &r->mime_type) && ReadParam(m, iter, &r->file_extensions) && ReadParam(m, iter, &r->description); } -void ParamTraits<WebPluginMimeType>::Log(const param_type& p, std::string* l) { +void ParamTraits<webkit::npapi::WebPluginMimeType>::Log(const param_type& p, + std::string* l) { l->append("("); LogParam(p.mime_type, l); l->append(", "); @@ -258,7 +261,8 @@ void ParamTraits<WebPluginMimeType>::Log(const param_type& p, std::string* l) { l->append(")"); } -void ParamTraits<WebPluginInfo>::Write(Message* m, const param_type& p) { +void ParamTraits<webkit::npapi::WebPluginInfo>::Write(Message* m, + const param_type& p) { WriteParam(m, p.name); WriteParam(m, p.path); WriteParam(m, p.version); @@ -267,8 +271,9 @@ void ParamTraits<WebPluginInfo>::Write(Message* m, const param_type& p) { WriteParam(m, p.enabled); } -bool ParamTraits<WebPluginInfo>::Read(const Message* m, void** iter, - param_type* r) { +bool ParamTraits<webkit::npapi::WebPluginInfo>::Read(const Message* m, + void** iter, + param_type* r) { return ReadParam(m, iter, &r->name) && ReadParam(m, iter, &r->path) && @@ -278,7 +283,8 @@ bool ParamTraits<WebPluginInfo>::Read(const Message* m, void** iter, ReadParam(m, iter, &r->enabled); } -void ParamTraits<WebPluginInfo>::Log(const param_type& p, std::string* l) { +void ParamTraits<webkit::npapi::WebPluginInfo>::Log(const param_type& p, + std::string* l) { l->append("("); LogParam(p.name, l); l->append(", "); diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 6e4e6b9..06e597c 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -61,10 +61,17 @@ struct ResourceLoadTimingInfo; struct ResourceResponseInfo; struct WebAccessibility; struct WebCookie; -struct WebPluginGeometry; struct WebAccessibility; } +namespace webkit { +namespace npapi { +struct WebPluginGeometry; +struct WebPluginInfo; +struct WebPluginMimeType; +} +} + struct AudioBuffersState; class ExtensionExtent; class GURL; @@ -77,8 +84,6 @@ struct SyncLoadResult; struct RendererPreferences; struct WebDropData; struct WebMenuItem; -struct WebPluginInfo; -struct WebPluginMimeType; struct WebPreferences; // Forward declarations of structures used to store data for when we have a lot @@ -151,8 +156,8 @@ struct ParamTraits<ContextMenuParams> { }; template <> -struct ParamTraits<webkit_glue::WebPluginGeometry> { - typedef webkit_glue::WebPluginGeometry param_type; +struct ParamTraits<webkit::npapi::WebPluginGeometry> { + typedef webkit::npapi::WebPluginGeometry param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* p); static void Log(const param_type& p, std::string* l); @@ -160,16 +165,16 @@ struct ParamTraits<webkit_glue::WebPluginGeometry> { // Traits for ViewMsg_GetPlugins_Reply structure to pack/unpack. template <> -struct ParamTraits<WebPluginMimeType> { - typedef WebPluginMimeType param_type; +struct ParamTraits<webkit::npapi::WebPluginMimeType> { + typedef webkit::npapi::WebPluginMimeType param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); }; template <> -struct ParamTraits<WebPluginInfo> { - typedef WebPluginInfo param_type; +struct ParamTraits<webkit::npapi::WebPluginInfo> { + typedef webkit::npapi::WebPluginInfo param_type; static void Write(Message* m, const param_type& p); static bool Read(const Message* m, void** iter, param_type* r); static void Log(const param_type& p, std::string* l); diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 947be93..01fc555 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -30,8 +30,8 @@ #include "webkit/glue/context_menu.h" #include "webkit/glue/form_data.h" #include "webkit/glue/password_form_dom_manager.h" -#include "webkit/glue/plugins/webplugininfo.h" #include "webkit/glue/webdropdata.h" +#include "webkit/plugins/npapi/webplugininfo.h" #if defined(OS_POSIX) #include "base/file_descriptor_posix.h" @@ -1362,8 +1362,8 @@ IPC_SYNC_MESSAGE_ROUTED2_1(ViewHostMsg_CookiesEnabled, // Used to get the list of plugins IPC_SYNC_MESSAGE_CONTROL1_1(ViewHostMsg_GetPlugins, - bool /* refresh*/, - std::vector<WebPluginInfo> /* plugins */) + bool /* refresh*/, + std::vector<webkit::npapi::WebPluginInfo> /* plugins */) // Return information about a plugin for the given URL and MIME // type. If there is no matching plugin, |found| is false. If @@ -1391,7 +1391,7 @@ IPC_SYNC_MESSAGE_CONTROL3_4(ViewHostMsg_GetPluginInfo, GURL /* policy_url */, std::string /* mime_type */, bool /* found */, - WebPluginInfo /* plugin info */, + webkit::npapi::WebPluginInfo /* plugin info */, ContentSetting /* setting */, std::string /* actual_mime_type */) @@ -1535,7 +1535,7 @@ IPC_SYNC_MESSAGE_CONTROL2_2(ViewHostMsg_OpenChannelToPlugin, GURL /* url */, std::string /* mime_type */, IPC::ChannelHandle /* channel_handle */, - WebPluginInfo /* info */) + webkit::npapi::WebPluginInfo /* info */) // A renderer sends this to the browser process when it wants to // create a pepper plugin. The browser will create the plugin process if diff --git a/chrome/common/render_messages_params.h b/chrome/common/render_messages_params.h index 7b21a20..911e3ae 100644 --- a/chrome/common/render_messages_params.h +++ b/chrome/common/render_messages_params.h @@ -32,11 +32,11 @@ #include "media/audio/audio_parameters.h" #include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h" #include "webkit/glue/password_form.h" -#include "webkit/glue/plugins/webplugin.h" #include "webkit/glue/resource_type.h" #include "webkit/glue/webaccessibility.h" #include "webkit/glue/webmenuitem.h" #include "webkit/glue/webpreferences.h" +#include "webkit/plugins/npapi/webplugin.h" // TODO(erg): Split this file into $1_db_params.h, $1_audio_params.h, // $1_print_params.h and $1_render_params.h. @@ -356,7 +356,7 @@ struct ViewHostMsg_UpdateRect_Params { gfx::Rect resizer_rect; // New window locations for plugin child windows. - std::vector<webkit_glue::WebPluginGeometry> plugin_window_moves; + std::vector<webkit::npapi::WebPluginGeometry> plugin_window_moves; // The following describes the various bits that may be set in flags: // |