diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-11 00:31:18 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-11 00:31:18 +0000 |
commit | 15ba07264a04a6c68a9d36b1f522e1b2dbc1c70b (patch) | |
tree | a23d185ce3e56305ba9333e2d37a00cf6ca6d48c | |
parent | 5a3045130a5152f87f1107402ec20ca707fde7ea (diff) | |
download | chromium_src-15ba07264a04a6c68a9d36b1f522e1b2dbc1c70b.zip chromium_src-15ba07264a04a6c68a9d36b1f522e1b2dbc1c70b.tar.gz chromium_src-15ba07264a04a6c68a9d36b1f522e1b2dbc1c70b.tar.bz2 |
Revert 199560 "Move the plugins sources out of the webkit glue t..."
> Move the plugins sources out of the webkit glue target into a new target 'plugins' which creates a static lib/dll
> depending on the component build flag.
>
> This target is specified by the added webkit_plugins.gypi file in the webkit\plugins folder. This is included
> by webkit_support.gyp.
>
> This is continuation of the ongoing work for bug https://code.google.com/p/chromium/issues/detail?can=2&q=237249
> which is splitting chrome.dll into a browser and renderer component due to build issues on Windows.
>
> The motivation for moving the plugins out to an independent target is to enable the chrome browser code to
> link to the plugins lib without depending on glue.
>
> We also have a plugins_common target in webkit_plugins.gypi which builds a static lib and contains common plugin
> functionality like plugin_utils, webplugininfo, etc.
>
> Next step is to move the plugin list sources to this common target as we want to avoid browser depending Webkit
> through plugins. That would need some code change which I wanted to avoid in this CL.
>
> Will also move the common plugin files to the newly added webkit common folder in an upcoming CL.
>
> BUG=237249
> TBR=cpu@chromium.org, darin@chromium.org, jamesr@chromium.org
>
> Review URL: https://codereview.chromium.org/15020011
TBR=ananta@chromium.org
Review URL: https://codereview.chromium.org/14646038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199592 0039d316-1c4b-4281-b951-d872f2087c98
22 files changed, 230 insertions, 341 deletions
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index c70d1de9..5c585c2 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2287,8 +2287,6 @@ '../ui/web_dialogs/web_dialogs.gyp:web_dialogs', '../v8/tools/gyp/v8.gyp:v8', '../webkit/support/webkit_support.gyp:glue', - '../webkit/support/webkit_support.gyp:plugins', - '../webkit/support/webkit_support.gyp:plugins_common', '../webkit/support/webkit_support.gyp:webkit_resources', '../webkit/support/webkit_support.gyp:webkit_storage', ], diff --git a/chrome/chrome_renderer.gypi b/chrome/chrome_renderer.gypi index 37a2c64..e6ce3ac 100644 --- a/chrome/chrome_renderer.gypi +++ b/chrome/chrome_renderer.gypi @@ -28,7 +28,6 @@ '../third_party/widevine/cdm/widevine_cdm.gyp:widevine_cdm_version_h', '../ui/surface/surface.gyp:surface', '../webkit/support/webkit_support.gyp:glue', - '../webkit/support/webkit_support.gyp:plugins', '../webkit/support/webkit_support.gyp:webkit_media', '../webkit/support/webkit_support.gyp:webkit_resources', ], diff --git a/content/content_plugin.gypi b/content/content_plugin.gypi index 6ff0057..be59c1f2 100644 --- a/content/content_plugin.gypi +++ b/content/content_plugin.gypi @@ -9,8 +9,6 @@ '../skia/skia.gyp:skia', '../third_party/npapi/npapi.gyp:npapi', '../webkit/support/webkit_support.gyp:glue', - '../webkit/support/webkit_support.gyp:plugins', - '../webkit/support/webkit_support.gyp:plugins_common', ], 'include_dirs': [ '<(INTERMEDIATE_DIR)', diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 6c752ea..27173a0 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -20,8 +20,6 @@ '../webkit/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support', '../webkit/gpu/webkit_gpu.gyp:webkit_gpu', '../webkit/support/webkit_support.gyp:glue', - '../webkit/support/webkit_support.gyp:plugins', - '../webkit/support/webkit_support.gyp:plugins_common', '../webkit/support/webkit_support.gyp:webkit_media', ], 'include_dirs': [ diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 30c3956..84584b8 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -571,8 +571,6 @@ '../ui/gl/gl.gyp:gl', '../v8/tools/gyp/v8.gyp:v8', '../webkit/support/webkit_support.gyp:glue', - '../webkit/support/webkit_support.gyp:plugins', - '../webkit/support/webkit_support.gyp:plugins_common', '../webkit/support/webkit_support.gyp:webkit_base', '../webkit/support/webkit_support.gyp:webkit_media', '../webkit/support/webkit_support.gyp:webkit_storage', diff --git a/content/plugin/plugin_thread.cc b/content/plugin/plugin_thread.cc index 27e3f55..8256ef6 100644 --- a/content/plugin/plugin_thread.cc +++ b/content/plugin/plugin_thread.cc @@ -29,7 +29,6 @@ #include "webkit/glue/webkit_glue.h" #include "webkit/plugins/npapi/plugin_lib.h" #include "webkit/plugins/npapi/plugin_list.h" -#include "webkit/plugins/npapi/plugin_utils.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h" #if defined(TOOLKIT_GTK) @@ -148,7 +147,7 @@ void PluginThread::Shutdown() { NPChannelBase::CleanupChannels(); webkit::npapi::PluginLib::UnloadAllPlugins(); - if (webkit::npapi::ShouldForcefullyTerminatePluginProcess()) + if (webkit_glue::ShouldForcefullyTerminatePluginProcess()) base::KillProcess(base::GetCurrentProcessHandle(), 0, /* wait= */ false); lazy_tls.Pointer()->Set(NULL); diff --git a/content/renderer/pepper/pepper_graphics_2d_host.h b/content/renderer/pepper/pepper_graphics_2d_host.h index 369ddd2..30f5f0d 100644 --- a/content/renderer/pepper/pepper_graphics_2d_host.h +++ b/content/renderer/pepper/pepper_graphics_2d_host.h @@ -37,8 +37,7 @@ class RendererPpapiHost; class CONTENT_EXPORT PepperGraphics2DHost : public ppapi::host::ResourceHost, - public NON_EXPORTED_BASE( - webkit::ppapi::PluginDelegate::PlatformGraphics2D), + public webkit::ppapi::PluginDelegate::PlatformGraphics2D, public base::SupportsWeakPtr<PepperGraphics2DHost> { public: static PepperGraphics2DHost* Create(RendererPpapiHost* host, diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index c8796cb..59c5d8f 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -84,6 +84,9 @@ static const char kFileTestPrefix[] = "(file test):"; namespace webkit_glue { +// Global variable used by the plugin quirk "die after unload". +bool g_forcefully_terminate_plugin_process = false; + void SetJavaScriptFlags(const std::string& str) { v8::V8::SetFlagsFromString(str.data(), static_cast<int>(str.size())); } @@ -157,6 +160,14 @@ void PlatformFileInfoToWebFileInfo( web_file_info->type = WebKit::WebFileInfo::TypeFile; } +void SetForcefullyTerminatePluginProcess(bool value) { + g_forcefully_terminate_plugin_process = value; +} + +bool ShouldForcefullyTerminatePluginProcess() { + return g_forcefully_terminate_plugin_process; +} + WebCanvas* ToWebCanvas(skia::PlatformCanvas* canvas) { return canvas; } diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index f2f94ecd..e2aebcf 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -61,6 +61,7 @@ 'defines': [ 'WEBKIT_EXTENSIONS_IMPLEMENTATION', 'WEBKIT_GLUE_IMPLEMENTATION', + 'WEBKIT_PLUGINS_IMPLEMENTATION', ], 'dependencies': [ '<(DEPTH)/base/base.gyp:base_i18n', @@ -69,7 +70,11 @@ '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib', '<(DEPTH)/gpu/gpu.gyp:gles2_implementation', + '<(DEPTH)/media/media.gyp:media', + '<(DEPTH)/media/media.gyp:shared_memory_support', '<(DEPTH)/net/net.gyp:net', + '<(DEPTH)/ppapi/ppapi.gyp:ppapi_c', + '<(DEPTH)/ppapi/ppapi_internal.gyp:ppapi_shared', '<(DEPTH)/printing/printing.gyp:printing', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', @@ -88,7 +93,6 @@ 'webkit_resources', 'webkit_storage', 'webkit_strings', - 'plugins_common', ], 'include_dirs': [ '<(INTERMEDIATE_DIR)', @@ -96,6 +100,157 @@ '<(SHARED_INTERMEDIATE_DIR)/ui', ], 'sources': [ + # This list contains all .h, .cc, and .mm files in glue except for + # those in the test subdirectory and those with unittest in in their + # names. + '../plugins/npapi/gtk_plugin_container.cc', + '../plugins/npapi/gtk_plugin_container.h', + '../plugins/npapi/gtk_plugin_container_manager.cc', + '../plugins/npapi/gtk_plugin_container_manager.h', + '../plugins/npapi/plugin_constants_win.cc', + '../plugins/npapi/plugin_constants_win.h', + '../plugins/npapi/plugin_host.cc', + '../plugins/npapi/plugin_host.h', + '../plugins/npapi/plugin_instance.cc', + '../plugins/npapi/plugin_instance.h', + '../plugins/npapi/plugin_instance_mac.mm', + '../plugins/npapi/plugin_lib.cc', + '../plugins/npapi/plugin_lib.h', + '../plugins/npapi/plugin_lib_mac.mm', + '../plugins/npapi/plugin_lib_posix.cc', + '../plugins/npapi/plugin_lib_win.cc', + '../plugins/npapi/plugin_list.cc', + '../plugins/npapi/plugin_list.h', + '../plugins/npapi/plugin_list_mac.mm', + '../plugins/npapi/plugin_list_posix.cc', + '../plugins/npapi/plugin_list_win.cc', + '../plugins/npapi/plugin_stream.cc', + '../plugins/npapi/plugin_stream.h', + '../plugins/npapi/plugin_stream_posix.cc', + '../plugins/npapi/plugin_stream_url.cc', + '../plugins/npapi/plugin_stream_url.h', + '../plugins/npapi/plugin_stream_win.cc', + '../plugins/npapi/plugin_string_stream.cc', + '../plugins/npapi/plugin_string_stream.h', + '../plugins/npapi/plugin_utils.cc', + '../plugins/npapi/plugin_utils.h', + '../plugins/npapi/plugin_web_event_converter_mac.h', + '../plugins/npapi/plugin_web_event_converter_mac.mm', + '../plugins/npapi/webplugin.cc', + '../plugins/npapi/webplugin.h', + '../plugins/npapi/webplugin_accelerated_surface_mac.h', + '../plugins/npapi/webplugin_delegate.h', + '../plugins/npapi/webplugin_delegate_impl.cc', + '../plugins/npapi/webplugin_delegate_impl.h', + '../plugins/npapi/webplugin_delegate_impl_android.cc', + '../plugins/npapi/webplugin_delegate_impl_aura.cc', + '../plugins/npapi/webplugin_delegate_impl_gtk.cc', + '../plugins/npapi/webplugin_delegate_impl_mac.mm', + '../plugins/npapi/webplugin_delegate_impl_win.cc', + '../plugins/npapi/webplugin_ime_win.cc', + '../plugins/npapi/webplugin_ime_win.h', + '../plugins/npapi/webplugin_impl.cc', + '../plugins/npapi/webplugin_impl.h', + '../plugins/plugin_constants.cc', + '../plugins/plugin_constants.h', + '../plugins/plugin_switches.cc', + '../plugins/plugin_switches.h', + '../plugins/ppapi/audio_helper.cc', + '../plugins/ppapi/audio_helper.h', + '../plugins/ppapi/common.h', + '../plugins/ppapi/content_decryptor_delegate.cc', + '../plugins/ppapi/content_decryptor_delegate.h', + '../plugins/ppapi/event_conversion.cc', + '../plugins/ppapi/event_conversion.h', + '../plugins/ppapi/file_callbacks.cc', + '../plugins/ppapi/file_callbacks.h', + '../plugins/ppapi/fullscreen_container.h', + '../plugins/ppapi/gfx_conversion.h', + '../plugins/ppapi/host_array_buffer_var.cc', + '../plugins/ppapi/host_array_buffer_var.h', + '../plugins/ppapi/host_globals.cc', + '../plugins/ppapi/host_globals.h', + '../plugins/ppapi/host_var_tracker.cc', + '../plugins/ppapi/host_var_tracker.h', + '../plugins/ppapi/message_channel.cc', + '../plugins/ppapi/message_channel.h', + '../plugins/ppapi/npapi_glue.cc', + '../plugins/ppapi/npapi_glue.h', + '../plugins/ppapi/npobject_var.cc', + '../plugins/ppapi/npobject_var.h', + '../plugins/ppapi/plugin_delegate.h', + '../plugins/ppapi/plugin_module.cc', + '../plugins/ppapi/plugin_module.h', + '../plugins/ppapi/plugin_object.cc', + '../plugins/ppapi/plugin_object.h', + '../plugins/ppapi/ppapi_interface_factory.cc', + '../plugins/ppapi/ppapi_interface_factory.h', + '../plugins/ppapi/ppapi_plugin_instance.cc', + '../plugins/ppapi/ppapi_plugin_instance.h', + '../plugins/ppapi/ppapi_webplugin_impl.cc', + '../plugins/ppapi/ppapi_webplugin_impl.h', + '../plugins/ppapi/ppb_audio_impl.cc', + '../plugins/ppapi/ppb_audio_impl.h', + '../plugins/ppapi/ppb_broker_impl.cc', + '../plugins/ppapi/ppb_broker_impl.h', + '../plugins/ppapi/ppb_buffer_impl.cc', + '../plugins/ppapi/ppb_buffer_impl.h', + '../plugins/ppapi/ppb_file_ref_impl.cc', + '../plugins/ppapi/ppb_file_ref_impl.h', + '../plugins/ppapi/ppb_flash_message_loop_impl.cc', + '../plugins/ppapi/ppb_flash_message_loop_impl.h', + '../plugins/ppapi/ppb_gpu_blacklist_private_impl.cc', + '../plugins/ppapi/ppb_gpu_blacklist_private_impl.h', + '../plugins/ppapi/ppb_graphics_3d_impl.cc', + '../plugins/ppapi/ppb_graphics_3d_impl.h', + '../plugins/ppapi/ppb_image_data_impl.cc', + '../plugins/ppapi/ppb_image_data_impl.h', + '../plugins/ppapi/ppb_network_monitor_private_impl.cc', + '../plugins/ppapi/ppb_network_monitor_private_impl.h', + '../plugins/ppapi/ppb_proxy_impl.cc', + '../plugins/ppapi/ppb_proxy_impl.h', + '../plugins/ppapi/ppb_scrollbar_impl.cc', + '../plugins/ppapi/ppb_scrollbar_impl.h', + '../plugins/ppapi/ppb_tcp_server_socket_private_impl.cc', + '../plugins/ppapi/ppb_tcp_server_socket_private_impl.h', + '../plugins/ppapi/ppb_tcp_socket_private_impl.cc', + '../plugins/ppapi/ppb_tcp_socket_private_impl.h', + '../plugins/ppapi/ppb_uma_private_impl.cc', + '../plugins/ppapi/ppb_uma_private_impl.h', + '../plugins/ppapi/ppb_url_loader_impl.cc', + '../plugins/ppapi/ppb_url_loader_impl.h', + '../plugins/ppapi/ppb_var_deprecated_impl.cc', + '../plugins/ppapi/ppb_var_deprecated_impl.h', + '../plugins/ppapi/ppb_video_decoder_impl.cc', + '../plugins/ppapi/ppb_video_decoder_impl.h', + '../plugins/ppapi/ppb_widget_impl.cc', + '../plugins/ppapi/ppb_widget_impl.h', + '../plugins/ppapi/ppb_x509_certificate_private_impl.cc', + '../plugins/ppapi/ppb_x509_certificate_private_impl.h', + '../plugins/ppapi/quota_file_io.cc', + '../plugins/ppapi/quota_file_io.h', + '../plugins/ppapi/resource_creation_impl.cc', + '../plugins/ppapi/resource_creation_impl.h', + '../plugins/ppapi/resource_helper.cc', + '../plugins/ppapi/resource_helper.h', + '../plugins/ppapi/string.cc', + '../plugins/ppapi/string.h', + '../plugins/ppapi/url_response_info_util.cc', + '../plugins/ppapi/url_response_info_util.h', + '../plugins/ppapi/url_request_info_util.cc', + '../plugins/ppapi/url_request_info_util.h', + '../plugins/ppapi/usb_key_code_conversion.h', + '../plugins/ppapi/usb_key_code_conversion.cc', + '../plugins/ppapi/usb_key_code_conversion_linux.cc', + '../plugins/ppapi/usb_key_code_conversion_mac.cc', + '../plugins/ppapi/usb_key_code_conversion_win.cc', + '../plugins/sad_plugin.cc', + '../plugins/sad_plugin.h', + '../plugins/webkit_plugins_export.h', + '../plugins/webplugininfo.cc', + '../plugins/webplugininfo.h', + '../plugins/webview_plugin.cc', + '../plugins/webview_plugin.h', 'alt_error_page_resource_fetcher.cc', 'alt_error_page_resource_fetcher.h', 'cpp_bound_class.cc', @@ -216,6 +371,9 @@ '<(DEPTH)/build/linux/system.gyp:gtk', ], 'sources/': [['exclude', '_x11\\.cc$']], + 'sources!': [ + 'plugins/plugin_stubs.cc', + ], 'conditions': [ ['linux_use_tcmalloc == 1', { 'dependencies': [ @@ -226,6 +384,9 @@ ], }], ['use_aura==1', { + 'sources/': [ + ['exclude', '^\\.\\./plugins/npapi/webplugin_delegate_impl_mac.mm'], + ], 'sources!': [ 'webcursor_mac.mm', 'webcursor_win.cc', @@ -241,6 +402,11 @@ 'webcursor_null.cc', ], }], + ['use_aura==1 and OS=="win"', { + 'sources/': [ + ['exclude', '^\\.\\./plugins/npapi/webplugin_delegate_impl_aura'], + ], + }], ['OS!="mac"', { 'sources/': [['exclude', '_mac\\.(cc|mm)$']], 'sources!': [ @@ -254,6 +420,13 @@ ], }, }], + ['enable_gpu!=1', { + 'sources!': [ + '../plugins/ppapi/ppb_graphics_3d_impl.cc', + '../plugins/ppapi/ppb_graphics_3d_impl.h', + '../plugins/ppapi/ppb_open_gl_es_impl.cc', + ], + }], ['OS!="win"', { 'sources/': [['exclude', '_win\\.cc$']], 'sources!': [ @@ -264,6 +437,9 @@ 'include_dirs': [ '<(DEPTH)/third_party/wtl/include', ], + 'sources!': [ + 'plugins/plugin_stubs.cc', + ], # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 'msvs_disabled_warnings': [ 4800, 4267 ], 'conditions': [ diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h index 53fe977..df9c867 100644 --- a/webkit/glue/webkit_glue.h +++ b/webkit/glue/webkit_glue.h @@ -62,6 +62,14 @@ WEBKIT_GLUE_EXPORT void CheckForLeaks(); WEBKIT_GLUE_EXPORT bool DecodeImage(const std::string& image_data, SkBitmap* image); +// Tells the plugin thread to terminate the process forcefully instead of +// exiting cleanly. +void SetForcefullyTerminatePluginProcess(bool value); + +// Returns true if the plugin thread should terminate the process forcefully +// instead of exiting cleanly. +WEBKIT_GLUE_EXPORT bool ShouldForcefullyTerminatePluginProcess(); + // File info conversion WEBKIT_GLUE_EXPORT void PlatformFileInfoToWebFileInfo( const base::PlatformFileInfo& file_info, diff --git a/webkit/plugins/npapi/plugin_constants_win.h b/webkit/plugins/npapi/plugin_constants_win.h index da2cace..0bdecf6 100644 --- a/webkit/plugins/npapi/plugin_constants_win.h +++ b/webkit/plugins/npapi/plugin_constants_win.h @@ -6,6 +6,7 @@ #define WEBKIT_PLUGINS_NPAPI_PLUGIN_CONSTANTS_WIN_H_ #include "base/string16.h" +#include "webkit/plugins/webkit_plugins_export.h" #if !defined(OS_WIN) #error "Windows-only header" @@ -20,17 +21,17 @@ extern const char16 kNativeWindowClassName[]; // The name of the window class name for the wrapper HWND around the actual // plugin window that's used when running in multi-process mode. This window // is created on the browser UI thread. -extern const char16 kWrapperNativeWindowClassName[]; +WEBKIT_PLUGINS_EXPORT extern const char16 kWrapperNativeWindowClassName[]; // The name of the custom window message that the browser uses to tell the // plugin process to paint a window. -extern const char16 kPaintMessageName[]; +WEBKIT_PLUGINS_EXPORT extern const char16 kPaintMessageName[]; // The name of the registry key which NPAPI plugins update on installation. -extern const char16 kRegistryMozillaPlugins[]; +WEBKIT_PLUGINS_EXPORT extern const char16 kRegistryMozillaPlugins[]; extern const char16 kMozillaActiveXPlugin[]; -extern const char16 kNewWMPPlugin[]; +WEBKIT_PLUGINS_EXPORT extern const char16 kNewWMPPlugin[]; extern const char16 kOldWMPPlugin[]; extern const char16 kYahooApplicationStatePlugin[]; extern const char16 kWanWangProtocolHandlerPlugin[]; diff --git a/webkit/plugins/npapi/plugin_utils.cc b/webkit/plugins/npapi/plugin_utils.cc index e08f818..df6efa6 100644 --- a/webkit/plugins/npapi/plugin_utils.cc +++ b/webkit/plugins/npapi/plugin_utils.cc @@ -13,9 +13,6 @@ namespace webkit { namespace npapi { -// Global variable used by the plugin quirk "die after unload". -bool g_forcefully_terminate_plugin_process = false; - void CreateVersionFromString(const base::string16& version_string, Version* parsed_version) { // Remove spaces and ')' from the version string, @@ -55,13 +52,5 @@ bool NPAPIPluginsSupported() { #endif } -void SetForcefullyTerminatePluginProcess(bool value) { - g_forcefully_terminate_plugin_process = value; -} - -bool ShouldForcefullyTerminatePluginProcess() { - return g_forcefully_terminate_plugin_process; -} - } // namespace npapi } // namespace webkit diff --git a/webkit/plugins/npapi/plugin_utils.h b/webkit/plugins/npapi/plugin_utils.h index ba0c2e8..8fe1b13 100644 --- a/webkit/plugins/npapi/plugin_utils.h +++ b/webkit/plugins/npapi/plugin_utils.h @@ -6,6 +6,7 @@ #define WEBKIT_PLUGINS_NPAPI_PLUGIN_UTILS_H_ #include "base/string16.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace base { class Version; @@ -16,22 +17,12 @@ namespace npapi { // Parse a version string as used by a plug-in. This method is more lenient // in accepting weird version strings than base::Version::GetFromString() -void CreateVersionFromString( +WEBKIT_PLUGINS_EXPORT void CreateVersionFromString( const base::string16& version_string, base::Version* parsed_version); // Returns true iff NPAPI plugins are supported on the current platform. -bool NPAPIPluginsSupported(); - -// Tells the plugin thread to terminate the process forcefully instead of -// exiting cleanly. -void SetForcefullyTerminatePluginProcess(bool value); - -// Returns true if the plugin thread should terminate the process forcefully -// instead of exiting cleanly. -bool ShouldForcefullyTerminatePluginProcess(); - - +WEBKIT_PLUGINS_EXPORT bool NPAPIPluginsSupported(); } // namespace npapi } // namespace webkit diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.cc b/webkit/plugins/npapi/webplugin_delegate_impl.cc index a27fc9f..e1540ee 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl.cc +++ b/webkit/plugins/npapi/webplugin_delegate_impl.cc @@ -16,7 +16,6 @@ #include "webkit/plugins/npapi/plugin_instance.h" #include "webkit/plugins/npapi/plugin_lib.h" #include "webkit/plugins/npapi/plugin_stream_url.h" -#include "webkit/plugins/npapi/plugin_utils.h" using WebKit::WebCursorInfo; using WebKit::WebInputEvent; @@ -64,7 +63,7 @@ bool WebPluginDelegateImpl::Initialize( } if (quirks_ & PLUGIN_QUIRK_DIE_AFTER_UNLOAD) - webkit::npapi::SetForcefullyTerminatePluginProcess(true); + webkit_glue::SetForcefullyTerminatePluginProcess(true); int argc = 0; scoped_ptr<char*[]> argn(new char*[arg_names.size()]); diff --git a/webkit/plugins/plugin_constants.h b/webkit/plugins/plugin_constants.h index 6792fb3..643d282 100644 --- a/webkit/plugins/plugin_constants.h +++ b/webkit/plugins/plugin_constants.h @@ -6,19 +6,20 @@ #define WEBKIT_PLUGINS_PLUGIN_CONSTANTS_H_ #include "base/basictypes.h" +#include "webkit/plugins/webkit_plugins_export.h" -extern const char kFlashPluginName[]; -extern const char kFlashPluginSwfMimeType[]; -extern const char kFlashPluginSwfExtension[]; -extern const char kFlashPluginSwfDescription[]; -extern const char kFlashPluginSplMimeType[]; -extern const char kFlashPluginSplExtension[]; -extern const char kFlashPluginSplDescription[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginName[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSwfMimeType[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSwfExtension[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSwfDescription[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSplMimeType[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSplExtension[]; +WEBKIT_PLUGINS_EXPORT extern const char kFlashPluginSplDescription[]; // The maximum plugin width and height. -extern const uint16 kMaxPluginSideLength; +WEBKIT_PLUGINS_EXPORT extern const uint16 kMaxPluginSideLength; // The maximum plugin size, defined as the number of pixels occupied by the // plugin. -extern const uint32 kMaxPluginSize; +WEBKIT_PLUGINS_EXPORT extern const uint32 kMaxPluginSize; #endif // WEBKIT_PLUGINS_PLUGIN_CONSTANTS_H_ diff --git a/webkit/plugins/plugin_switches.h b/webkit/plugins/plugin_switches.h index cba11ae..08ed5ae 100644 --- a/webkit/plugins/plugin_switches.h +++ b/webkit/plugins/plugin_switches.h @@ -6,15 +6,16 @@ #define WEBKIT_PLUGINS_PLUGIN_SWITCHES_H_ #include "build/build_config.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace switches { -extern const char kDebugPluginLoading[]; -extern const char kDisablePepper3d[]; -extern const char kPpapiFlashArgs[]; +WEBKIT_PLUGINS_EXPORT extern const char kDebugPluginLoading[]; +WEBKIT_PLUGINS_EXPORT extern const char kDisablePepper3d[]; +WEBKIT_PLUGINS_EXPORT extern const char kPpapiFlashArgs[]; #if defined(OS_WIN) -extern const char kUseOldWMPPlugin[]; +WEBKIT_PLUGINS_EXPORT extern const char kUseOldWMPPlugin[]; #endif } // namespace switches diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc index 7f2c08f..c856b1e 100644 --- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc +++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc @@ -1712,7 +1712,7 @@ void PluginInstance::UpdateLayer() { if (!container_) return; - bool want_layer = !!GetBackingTextureId(); + bool want_layer = GetBackingTextureId(); if (want_layer == !!texture_layer_.get() && layer_bound_to_fullscreen_ == !!fullscreen_container_) diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.h b/webkit/plugins/ppapi/ppb_file_ref_impl.h index 272b4a4..5604eab7 100644 --- a/webkit/plugins/ppapi/ppb_file_ref_impl.h +++ b/webkit/plugins/ppapi/ppb_file_ref_impl.h @@ -16,8 +16,8 @@ #include "ppapi/shared_impl/ppb_file_ref_shared.h" #include "ppapi/shared_impl/scoped_pp_resource.h" #include "ppapi/shared_impl/var.h" +#include "webkit/glue/webkit_glue_export.h" #include "webkit/plugins/ppapi/file_callbacks.h" -#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { namespace ppapi { @@ -26,7 +26,7 @@ using ::ppapi::StringVar; class PPB_FileSystem_Impl; -class WEBKIT_PLUGINS_EXPORT PPB_FileRef_Impl +class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl : public ::ppapi::PPB_FileRef_Shared { public: PPB_FileRef_Impl(const ::ppapi::PPB_FileRef_CreateInfo& info, diff --git a/webkit/plugins/webkit_plugins.gypi b/webkit/plugins/webkit_plugins.gypi deleted file mode 100644 index cf197d0..0000000 --- a/webkit/plugins/webkit_plugins.gypi +++ /dev/null @@ -1,275 +0,0 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'targets': [ - { - 'target_name': 'plugins_common', - 'type': 'static_library', - 'defines': [ - 'WEBKIT_PLUGINS_IMPLEMENTATION', - ], - 'include_dirs': [ - '<(INTERMEDIATE_DIR)', - '<(SHARED_INTERMEDIATE_DIR)/ui', - ], - 'dependencies': [ - '<(DEPTH)/base/base.gyp:base_i18n', - '<(DEPTH)/base/base.gyp:base_static', - ], - 'sources': [ - '../plugins/webplugininfo.cc', - '../plugins/webplugininfo.h', - '../plugins/plugin_constants.cc', - '../plugins/plugin_constants.h', - '../plugins/npapi/plugin_constants_win.cc', - '../plugins/npapi/plugin_constants_win.h', - '../plugins/plugin_switches.cc', - '../plugins/plugin_switches.h', - '../plugins/npapi/plugin_utils.cc', - '../plugins/npapi/plugin_utils.h', - ], - }, - - { - 'target_name': 'plugins', - 'type': '<(component)', - 'defines': [ - 'WEBKIT_PLUGINS_IMPLEMENTATION', - ], - 'include_dirs': [ - '<(INTERMEDIATE_DIR)', - '<(SHARED_INTERMEDIATE_DIR)/webkit', - '<(SHARED_INTERMEDIATE_DIR)/ui', - ], - 'dependencies': [ - '<(DEPTH)/base/base.gyp:base', - '<(DEPTH)/base/base.gyp:base_i18n', - '<(DEPTH)/base/base.gyp:base_static', - '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - '<(DEPTH)/build/temp_gyp/googleurl.gyp:googleurl', - '<(DEPTH)/gpu/gpu.gyp:gles2_c_lib', - '<(DEPTH)/gpu/gpu.gyp:gles2_implementation', - '<(DEPTH)/media/media.gyp:media', - '<(DEPTH)/media/media.gyp:shared_memory_support', - '<(DEPTH)/net/net.gyp:net', - '<(DEPTH)/ppapi/ppapi.gyp:ppapi_c', - '<(DEPTH)/ppapi/ppapi_internal.gyp:ppapi_shared', - '<(DEPTH)/printing/printing.gyp:printing',
- '<(DEPTH)/skia/skia.gyp:skia', - '<(DEPTH)/ui/gl/gl.gyp:gl', - '<(DEPTH)/ui/ui.gyp:ui', - '<(DEPTH)/ui/ui.gyp:ui_resources', - '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', - '<(DEPTH)/webkit/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support', - '../../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit', - 'glue', - 'plugins_common', - 'user_agent', - 'webkit_base', - 'webkit_storage', - ], - 'sources': [ - # This list contains all .h, .cc, and .mm files in glue except for - # those in the test subdirectory and those with unittest in in their - # names. - '../plugins/npapi/gtk_plugin_container.cc', - '../plugins/npapi/gtk_plugin_container.h', - '../plugins/npapi/gtk_plugin_container_manager.cc', - '../plugins/npapi/gtk_plugin_container_manager.h', - '../plugins/npapi/plugin_host.cc', - '../plugins/npapi/plugin_host.h', - '../plugins/npapi/plugin_instance.cc', - '../plugins/npapi/plugin_instance.h', - '../plugins/npapi/plugin_instance_mac.mm', - '../plugins/npapi/plugin_lib.cc', - '../plugins/npapi/plugin_lib.h', - '../plugins/npapi/plugin_lib_mac.mm', - '../plugins/npapi/plugin_lib_posix.cc', - '../plugins/npapi/plugin_lib_win.cc', - '../plugins/npapi/plugin_list.cc', - '../plugins/npapi/plugin_list.h', - '../plugins/npapi/plugin_list_mac.mm', - '../plugins/npapi/plugin_list_posix.cc', - '../plugins/npapi/plugin_list_win.cc', - '../plugins/npapi/plugin_stream.cc', - '../plugins/npapi/plugin_stream.h', - '../plugins/npapi/plugin_stream_posix.cc', - '../plugins/npapi/plugin_stream_url.cc', - '../plugins/npapi/plugin_stream_url.h', - '../plugins/npapi/plugin_stream_win.cc', - '../plugins/npapi/plugin_string_stream.cc', - '../plugins/npapi/plugin_string_stream.h', - '../plugins/npapi/plugin_web_event_converter_mac.h', - '../plugins/npapi/plugin_web_event_converter_mac.mm', - '../plugins/npapi/webplugin.cc', - '../plugins/npapi/webplugin.h', - '../plugins/npapi/webplugin_accelerated_surface_mac.h', - '../plugins/npapi/webplugin_delegate.h', - '../plugins/npapi/webplugin_delegate_impl.cc', - '../plugins/npapi/webplugin_delegate_impl.h', - '../plugins/npapi/webplugin_delegate_impl_android.cc', - '../plugins/npapi/webplugin_delegate_impl_aura.cc', - '../plugins/npapi/webplugin_delegate_impl_gtk.cc', - '../plugins/npapi/webplugin_delegate_impl_mac.mm', - '../plugins/npapi/webplugin_delegate_impl_win.cc', - '../plugins/npapi/webplugin_ime_win.cc', - '../plugins/npapi/webplugin_ime_win.h', - '../plugins/npapi/webplugin_impl.cc', - '../plugins/npapi/webplugin_impl.h', - '../plugins/ppapi/audio_helper.cc', - '../plugins/ppapi/audio_helper.h', - '../plugins/ppapi/common.h', - '../plugins/ppapi/content_decryptor_delegate.cc', - '../plugins/ppapi/content_decryptor_delegate.h', - '../plugins/ppapi/event_conversion.cc', - '../plugins/ppapi/event_conversion.h', - '../plugins/ppapi/file_callbacks.cc', - '../plugins/ppapi/file_callbacks.h', - '../plugins/ppapi/fullscreen_container.h', - '../plugins/ppapi/gfx_conversion.h', - '../plugins/ppapi/host_array_buffer_var.cc', - '../plugins/ppapi/host_array_buffer_var.h', - '../plugins/ppapi/host_globals.cc', - '../plugins/ppapi/host_globals.h', - '../plugins/ppapi/host_var_tracker.cc', - '../plugins/ppapi/host_var_tracker.h', - '../plugins/ppapi/message_channel.cc', - '../plugins/ppapi/message_channel.h', - '../plugins/ppapi/npapi_glue.cc', - '../plugins/ppapi/npapi_glue.h', - '../plugins/ppapi/npobject_var.cc', - '../plugins/ppapi/npobject_var.h', - '../plugins/ppapi/plugin_delegate.h', - '../plugins/ppapi/plugin_module.cc', - '../plugins/ppapi/plugin_module.h', - '../plugins/ppapi/plugin_object.cc', - '../plugins/ppapi/plugin_object.h', - '../plugins/ppapi/ppapi_interface_factory.cc', - '../plugins/ppapi/ppapi_interface_factory.h', - '../plugins/ppapi/ppapi_plugin_instance.cc', - '../plugins/ppapi/ppapi_plugin_instance.h', - '../plugins/ppapi/ppapi_webplugin_impl.cc', - '../plugins/ppapi/ppapi_webplugin_impl.h', - '../plugins/ppapi/ppb_audio_impl.cc', - '../plugins/ppapi/ppb_audio_impl.h', - '../plugins/ppapi/ppb_broker_impl.cc', - '../plugins/ppapi/ppb_broker_impl.h', - '../plugins/ppapi/ppb_buffer_impl.cc', - '../plugins/ppapi/ppb_buffer_impl.h', - '../plugins/ppapi/ppb_file_ref_impl.cc', - '../plugins/ppapi/ppb_file_ref_impl.h', - '../plugins/ppapi/ppb_flash_message_loop_impl.cc', - '../plugins/ppapi/ppb_flash_message_loop_impl.h', - '../plugins/ppapi/ppb_gpu_blacklist_private_impl.cc', - '../plugins/ppapi/ppb_gpu_blacklist_private_impl.h', - '../plugins/ppapi/ppb_graphics_3d_impl.cc', - '../plugins/ppapi/ppb_graphics_3d_impl.h', - '../plugins/ppapi/ppb_image_data_impl.cc', - '../plugins/ppapi/ppb_image_data_impl.h', - '../plugins/ppapi/ppb_network_monitor_private_impl.cc', - '../plugins/ppapi/ppb_network_monitor_private_impl.h', - '../plugins/ppapi/ppb_proxy_impl.cc', - '../plugins/ppapi/ppb_proxy_impl.h', - '../plugins/ppapi/ppb_scrollbar_impl.cc', - '../plugins/ppapi/ppb_scrollbar_impl.h', - '../plugins/ppapi/ppb_tcp_server_socket_private_impl.cc', - '../plugins/ppapi/ppb_tcp_server_socket_private_impl.h', - '../plugins/ppapi/ppb_tcp_socket_private_impl.cc', - '../plugins/ppapi/ppb_tcp_socket_private_impl.h', - '../plugins/ppapi/ppb_uma_private_impl.cc', - '../plugins/ppapi/ppb_uma_private_impl.h', - '../plugins/ppapi/ppb_url_loader_impl.cc', - '../plugins/ppapi/ppb_url_loader_impl.h', - '../plugins/ppapi/ppb_var_deprecated_impl.cc', - '../plugins/ppapi/ppb_var_deprecated_impl.h', - '../plugins/ppapi/ppb_video_decoder_impl.cc', - '../plugins/ppapi/ppb_video_decoder_impl.h', - '../plugins/ppapi/ppb_widget_impl.cc', - '../plugins/ppapi/ppb_widget_impl.h', - '../plugins/ppapi/ppb_x509_certificate_private_impl.cc', - '../plugins/ppapi/ppb_x509_certificate_private_impl.h', - '../plugins/ppapi/quota_file_io.cc', - '../plugins/ppapi/quota_file_io.h', - '../plugins/ppapi/resource_creation_impl.cc', - '../plugins/ppapi/resource_creation_impl.h', - '../plugins/ppapi/resource_helper.cc', - '../plugins/ppapi/resource_helper.h', - '../plugins/ppapi/string.cc', - '../plugins/ppapi/string.h', - '../plugins/ppapi/url_response_info_util.cc', - '../plugins/ppapi/url_response_info_util.h', - '../plugins/ppapi/url_request_info_util.cc', - '../plugins/ppapi/url_request_info_util.h', - '../plugins/ppapi/usb_key_code_conversion.h', - '../plugins/ppapi/usb_key_code_conversion.cc', - '../plugins/ppapi/usb_key_code_conversion_linux.cc', - '../plugins/ppapi/usb_key_code_conversion_mac.cc', - '../plugins/ppapi/usb_key_code_conversion_win.cc', - '../plugins/sad_plugin.cc', - '../plugins/sad_plugin.h', - '../plugins/webkit_plugins_export.h', - '../plugins/webview_plugin.cc', - '../plugins/webview_plugin.h', - ], - 'conditions': [ - ['toolkit_uses_gtk == 1', { - 'dependencies': [ - '<(DEPTH)/build/linux/system.gyp:gtk', - ], - 'sources/': [['exclude', '_x11\\.cc$']], - 'sources!': [ - 'plugins/plugin_stubs.cc', - ], - 'conditions': [ - ['linux_use_tcmalloc == 1', { - 'dependencies': [ - # This is needed by ../extensions/v8/heap_profiler_extension.cc - '<(DEPTH)/base/allocator/allocator.gyp:allocator', - ], - }], - ], - }], - ['use_aura==1', { - 'sources/': [ - ['exclude', '^\\.\\./plugins/npapi/webplugin_delegate_impl_mac.mm'], - ], - }], - ['use_aura==1 and OS=="win"', { - 'sources/': [ - ['exclude', '^\\.\\./plugins/npapi/webplugin_delegate_impl_aura'], - ], - }], - ['OS!="mac"', { - 'sources/': [['exclude', '_mac\\.(cc|mm)$']], - }, { # else: OS=="mac" - 'sources/': [['exclude', 'plugin_(lib|list)_posix\\.cc$']], - 'link_settings': { - 'libraries': [ - '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework', - ], - }, - }], - ['enable_gpu!=1', { - 'sources!': [ - '../plugins/ppapi/ppb_graphics_3d_impl.cc', - '../plugins/ppapi/ppb_graphics_3d_impl.h', - '../plugins/ppapi/ppb_open_gl_es_impl.cc', - ], - }], - ['OS!="win"', { - 'sources/': [['exclude', '_win\\.cc$']], - }, { # else: OS=="win" - 'sources/': [['exclude', '_posix\\.cc$']], - 'include_dirs': [ - '<(DEPTH)/third_party/wtl/include', - ], - 'sources!': [ - 'plugins/plugin_stubs.cc', - ], - }], - ], - } - ], -} diff --git a/webkit/plugins/webplugininfo.h b/webkit/plugins/webplugininfo.h index 9b80fae..10ada2c 100644 --- a/webkit/plugins/webplugininfo.h +++ b/webkit/plugins/webplugininfo.h @@ -10,10 +10,11 @@ #include "base/basictypes.h" #include "base/files/file_path.h" +#include "webkit/plugins/webkit_plugins_export.h" namespace webkit { -struct WebPluginMimeType { +struct WEBKIT_PLUGINS_EXPORT WebPluginMimeType { WebPluginMimeType(); // A constructor for the common case of a single file extension and an ASCII // description. @@ -37,7 +38,7 @@ struct WebPluginMimeType { }; // Describes an available NPAPI or Pepper plugin. -struct WebPluginInfo { +struct WEBKIT_PLUGINS_EXPORT WebPluginInfo { enum PluginType { PLUGIN_TYPE_NPAPI, PLUGIN_TYPE_PEPPER_IN_PROCESS, @@ -79,9 +80,9 @@ struct WebPluginInfo { }; // Checks whether a plugin is a Pepper plugin, enabled or disabled. -bool IsPepperPlugin(const WebPluginInfo& plugin); +WEBKIT_PLUGINS_EXPORT bool IsPepperPlugin(const WebPluginInfo& plugin); -bool IsOutOfProcessPlugin(const WebPluginInfo& plugin); +WEBKIT_PLUGINS_EXPORT bool IsOutOfProcessPlugin(const WebPluginInfo& plugin); } // namespace webkit diff --git a/webkit/support/webkit_support.gyp b/webkit/support/webkit_support.gyp index 713c06e..ad22dce 100644 --- a/webkit/support/webkit_support.gyp +++ b/webkit/support/webkit_support.gyp @@ -18,7 +18,6 @@ '../database/webkit_database.gypi', '../glue/webkit_glue.gypi', '../media/webkit_media.gypi', - '../plugins/webkit_plugins.gypi', '../quota/webkit_quota.gypi', '../storage/webkit_storage.gypi', 'webkit_support.gypi', diff --git a/webkit/support/webkit_support.gypi b/webkit/support/webkit_support.gypi index cd26545..0541603 100644 --- a/webkit/support/webkit_support.gypi +++ b/webkit/support/webkit_support.gypi @@ -28,8 +28,6 @@ '<(DEPTH)/webkit/compositor_bindings/compositor_bindings.gyp:webkit_compositor_support', '<(DEPTH)/webkit/gpu/webkit_gpu.gyp:webkit_gpu', 'glue', - 'plugins', - 'plugins_common', 'user_agent', 'webkit_base', 'webkit_media', |