summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-20 21:38:12 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-20 21:38:12 +0000
commitb692a128b073b297a4ce2aa7c468fdd37823e3a8 (patch)
tree3561224ba86e8eabd75f3e7a2f2343002d9a58ff
parentb07c8d9a926a89d0aa7c0de2e1d2685b728a887e (diff)
downloadchromium_src-b692a128b073b297a4ce2aa7c468fdd37823e3a8.zip
chromium_src-b692a128b073b297a4ce2aa7c468fdd37823e3a8.tar.gz
chromium_src-b692a128b073b297a4ce2aa7c468fdd37823e3a8.tar.bz2
Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi and put
them in the webkit::npapi namespace. BUG=none TEST=none Review URL: http://codereview.chromium.org/6012002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69755 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/framework.order14
-rw-r--r--chrome/browser/automation/automation_provider.cc1
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc17
-rw-r--r--chrome/browser/dom_ui/plugins_ui.cc5
-rw-r--r--chrome/browser/gtk/content_setting_bubble_gtk.cc4
-rw-r--r--chrome/browser/hang_monitor/hung_plugin_action.cc6
-rw-r--r--chrome/browser/metrics/metrics_log.cc8
-rw-r--r--chrome/browser/metrics/metrics_log.h15
-rw-r--r--chrome/browser/metrics/metrics_service.cc19
-rw-r--r--chrome/browser/metrics/metrics_service.h9
-rw-r--r--chrome/browser/mock_plugin_exceptions_table_model.cc4
-rw-r--r--chrome/browser/mock_plugin_exceptions_table_model.h7
-rw-r--r--chrome/browser/plugin_carbon_interpose_mac.cc14
-rw-r--r--chrome/browser/plugin_data_remover.cc21
-rw-r--r--chrome/browser/plugin_data_remover.h2
-rw-r--r--chrome/browser/plugin_exceptions_table_model.cc6
-rw-r--r--chrome/browser/plugin_exceptions_table_model.h5
-rw-r--r--chrome/browser/plugin_exceptions_table_model_unittest.cc18
-rw-r--r--chrome/browser/plugin_installer.cc6
-rw-r--r--chrome/browser/plugin_process_host.cc2
-rw-r--r--chrome/browser/plugin_process_host.h10
-rw-r--r--chrome/browser/plugin_service.cc50
-rw-r--r--chrome/browser/plugin_service.h8
-rw-r--r--chrome/browser/plugin_service_browsertest.cc12
-rw-r--r--chrome/browser/plugin_service_unittest.cc1
-rw-r--r--chrome/browser/plugin_updater.cc45
-rw-r--r--chrome/browser/plugin_updater.h15
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_mac.cc4
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_mac.h6
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc4
-rw-r--r--chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h7
-rw-r--r--chrome/browser/renderer_host/buffered_resource_handler.cc14
-rw-r--r--chrome/browser/renderer_host/render_message_filter.cc32
-rw-r--r--chrome/browser/renderer_host/render_message_filter.h7
-rw-r--r--chrome/browser/renderer_host/render_widget_host.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view.h7
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.cc4
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_gtk.h6
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.h2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac.mm12
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm4
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views.cc2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_views.h2
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.cc19
-rw-r--r--chrome/browser/renderer_host/render_widget_host_view_win.h2
-rw-r--r--chrome/browser/renderer_host/test/test_render_view_host.h2
-rw-r--r--chrome/browser/tab_contents/tab_contents.cc6
-rw-r--r--chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm24
-rw-r--r--chrome/common/chrome_plugin_lib.cc4
-rw-r--r--chrome/common/default_plugin.cc9
-rw-r--r--chrome/common/gpu_plugin.cc14
-rw-r--r--chrome/common/render_messages.cc34
-rw-r--r--chrome/common/render_messages.h23
-rw-r--r--chrome/common/render_messages_internal.h10
-rw-r--r--chrome/common/render_messages_params.h4
-rw-r--r--chrome/default_plugin/DEPS1
-rw-r--r--chrome/default_plugin/plugin_impl_gtk.cc4
-rw-r--r--chrome/default_plugin/plugin_impl_mac.mm4
-rw-r--r--chrome/default_plugin/plugin_impl_win.cc13
-rw-r--r--chrome/plugin/DEPS2
-rw-r--r--chrome/plugin/chrome_plugin_host.cc6
-rw-r--r--chrome/plugin/npobject_proxy.cc6
-rw-r--r--chrome/plugin/npobject_stub.cc4
-rw-r--r--chrome/plugin/npobject_util.cc4
-rw-r--r--chrome/plugin/plugin_channel.cc8
-rw-r--r--chrome/plugin/plugin_interpose_util_mac.mm18
-rw-r--r--chrome/plugin/plugin_thread.cc10
-rw-r--r--chrome/plugin/plugin_thread.h2
-rw-r--r--chrome/plugin/webplugin_accelerated_surface_proxy_mac.h4
-rw-r--r--chrome/plugin/webplugin_delegate_stub.cc19
-rw-r--r--chrome/plugin/webplugin_delegate_stub.h6
-rw-r--r--chrome/plugin/webplugin_proxy.cc10
-rw-r--r--chrome/plugin/webplugin_proxy.h24
-rw-r--r--chrome/renderer/blocked_plugin.cc14
-rw-r--r--chrome/renderer/blocked_plugin.h18
-rw-r--r--chrome/renderer/pepper_devices.cc4
-rw-r--r--chrome/renderer/pepper_devices_browsertest.cc21
-rw-r--r--chrome/renderer/pepper_plugin_delegate_impl.cc2
-rw-r--r--chrome/renderer/pepper_scrollbar_widget.cc2
-rw-r--r--chrome/renderer/pepper_widget.cc14
-rw-r--r--chrome/renderer/render_process_impl.cc4
-rw-r--r--chrome/renderer/render_view.cc46
-rw-r--r--chrome/renderer/render_view.h21
-rw-r--r--chrome/renderer/render_widget.cc4
-rw-r--r--chrome/renderer/render_widget.h8
-rw-r--r--chrome/renderer/renderer_glue.cc3
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.cc39
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.h22
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc17
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.h20
-rw-r--r--chrome/test/plugin/plugin_test.cpp7
-rw-r--r--webkit/glue/plugins/plugin_constants_win.h41
-rw-r--r--webkit/glue/plugins/plugin_list.h332
-rw-r--r--webkit/glue/plugins/plugin_stubs.cc30
-rw-r--r--webkit/glue/webkit_glue.gypi146
-rw-r--r--webkit/glue/webkit_glue.h10
-rw-r--r--webkit/glue/webkitclient_impl.cc10
-rw-r--r--webkit/plugins/npapi/DEPS (renamed from webkit/glue/plugins/DEPS)2
-rw-r--r--webkit/plugins/npapi/carbon_plugin_window_tracker_mac.cc (renamed from webkit/glue/plugins/carbon_plugin_window_tracker_mac.cc)9
-rw-r--r--webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h (renamed from webkit/glue/plugins/carbon_plugin_window_tracker_mac.h)12
-rw-r--r--webkit/plugins/npapi/coregraphics_private_symbols_mac.h (renamed from webkit/glue/plugins/coregraphics_private_symbols_mac.h)6
-rw-r--r--webkit/plugins/npapi/default_plugin_shared.h (renamed from webkit/glue/plugins/default_plugin_shared.h)12
-rw-r--r--webkit/plugins/npapi/gtk_plugin_container.cc (renamed from webkit/glue/plugins/gtk_plugin_container.cc)10
-rw-r--r--webkit/plugins/npapi/gtk_plugin_container.h (renamed from webkit/glue/plugins/gtk_plugin_container.h)12
-rw-r--r--webkit/plugins/npapi/gtk_plugin_container_manager.cc (renamed from webkit/glue/plugins/gtk_plugin_container_manager.cc)14
-rw-r--r--webkit/plugins/npapi/gtk_plugin_container_manager.h (renamed from webkit/glue/plugins/gtk_plugin_container_manager.h)16
-rw-r--r--webkit/plugins/npapi/npapi_extension_thunk.cc (renamed from webkit/glue/plugins/npapi_extension_thunk.cc)90
-rw-r--r--webkit/plugins/npapi/npapi_extension_thunk.h (renamed from webkit/glue/plugins/npapi_extension_thunk.h)12
-rw-r--r--webkit/plugins/npapi/plugin_constants_win.cc28
-rw-r--r--webkit/plugins/npapi/plugin_constants_win.h45
-rw-r--r--webkit/plugins/npapi/plugin_group.cc (renamed from webkit/glue/plugins/plugin_group.cc)20
-rw-r--r--webkit/plugins/npapi/plugin_group.h (renamed from webkit/glue/plugins/plugin_group.h)24
-rw-r--r--webkit/plugins/npapi/plugin_group_unittest.cc (renamed from webkit/glue/plugins/plugin_group_unittest.cc)18
-rw-r--r--webkit/plugins/npapi/plugin_host.cc (renamed from webkit/glue/plugins/plugin_host.cc)127
-rw-r--r--webkit/plugins/npapi/plugin_host.h (renamed from webkit/glue/plugins/plugin_host.h)14
-rw-r--r--webkit/plugins/npapi/plugin_instance.cc (renamed from webkit/glue/plugins/plugin_instance.cc)29
-rw-r--r--webkit/plugins/npapi/plugin_instance.h (renamed from webkit/glue/plugins/plugin_instance.h)32
-rw-r--r--webkit/plugins/npapi/plugin_instance_mac.mm (renamed from webkit/glue/plugins/plugin_instance_mac.mm)13
-rw-r--r--webkit/plugins/npapi/plugin_lib.cc (renamed from webkit/glue/plugins/plugin_lib.cc)14
-rw-r--r--webkit/plugins/npapi/plugin_lib.h (renamed from webkit/glue/plugins/plugin_lib.h)16
-rw-r--r--webkit/plugins/npapi/plugin_lib_mac.mm (renamed from webkit/glue/plugins/plugin_lib_mac.mm)18
-rw-r--r--webkit/plugins/npapi/plugin_lib_posix.cc (renamed from webkit/glue/plugins/plugin_lib_posix.cc)17
-rw-r--r--webkit/plugins/npapi/plugin_lib_unittest.cc (renamed from webkit/glue/plugins/plugin_lib_unittest.cc)34
-rw-r--r--webkit/plugins/npapi/plugin_lib_win.cc (renamed from webkit/glue/plugins/plugin_lib_win.cc)12
-rw-r--r--webkit/plugins/npapi/plugin_list.cc (renamed from webkit/glue/plugins/plugin_list.cc)28
-rw-r--r--webkit/plugins/npapi/plugin_list.h339
-rw-r--r--webkit/plugins/npapi/plugin_list_mac.mm (renamed from webkit/glue/plugins/plugin_list_mac.mm)13
-rw-r--r--webkit/plugins/npapi/plugin_list_posix.cc (renamed from webkit/glue/plugins/plugin_list_posix.cc)12
-rw-r--r--webkit/plugins/npapi/plugin_list_win.cc (renamed from webkit/glue/plugins/plugin_list_win.cc)53
-rw-r--r--webkit/plugins/npapi/plugin_stream.cc (renamed from webkit/glue/plugins/plugin_stream.cc)14
-rw-r--r--webkit/plugins/npapi/plugin_stream.h (renamed from webkit/glue/plugins/plugin_stream.h)24
-rw-r--r--webkit/plugins/npapi/plugin_stream_posix.cc (renamed from webkit/glue/plugins/plugin_stream_posix.cc)10
-rw-r--r--webkit/plugins/npapi/plugin_stream_url.cc (renamed from webkit/glue/plugins/plugin_stream_url.cc)20
-rw-r--r--webkit/plugins/npapi/plugin_stream_url.h (renamed from webkit/glue/plugins/plugin_stream_url.h)21
-rw-r--r--webkit/plugins/npapi/plugin_stream_win.cc (renamed from webkit/glue/plugins/plugin_stream_win.cc)12
-rw-r--r--webkit/plugins/npapi/plugin_string_stream.cc (renamed from webkit/glue/plugins/plugin_string_stream.cc)10
-rw-r--r--webkit/plugins/npapi/plugin_string_stream.h (renamed from webkit/glue/plugins/plugin_string_stream.h)15
-rw-r--r--webkit/plugins/npapi/plugin_web_event_converter_mac.h (renamed from webkit/glue/plugins/plugin_web_event_converter_mac.h)14
-rw-r--r--webkit/plugins/npapi/plugin_web_event_converter_mac.mm (renamed from webkit/glue/plugins/plugin_web_event_converter_mac.mm)8
-rw-r--r--webkit/plugins/npapi/quickdraw_drawing_manager_mac.cc (renamed from webkit/glue/plugins/quickdraw_drawing_manager_mac.cc)10
-rw-r--r--webkit/plugins/npapi/quickdraw_drawing_manager_mac.h (renamed from webkit/glue/plugins/quickdraw_drawing_manager_mac.h)12
-rw-r--r--webkit/plugins/npapi/test/Info.plist (renamed from webkit/glue/plugins/test/Info.plist)0
-rw-r--r--webkit/plugins/npapi/test/npapi_constants.cc (renamed from webkit/glue/plugins/test/npapi_constants.cc)8
-rw-r--r--webkit/plugins/npapi/test/npapi_constants.h (renamed from webkit/glue/plugins/test/npapi_constants.h)13
-rw-r--r--webkit/plugins/npapi/test/npapi_test.cc (renamed from webkit/glue/plugins/test/npapi_test.cc)4
-rw-r--r--webkit/plugins/npapi/test/npapi_test.def (renamed from webkit/glue/plugins/test/npapi_test.def)0
-rw-r--r--webkit/plugins/npapi/test/npapi_test.rc (renamed from webkit/glue/plugins/test/npapi_test.rc)0
-rw-r--r--webkit/plugins/npapi/test/plugin_arguments_test.cc (renamed from webkit/glue/plugins/test/plugin_arguments_test.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_arguments_test.h (renamed from webkit/glue/plugins/test/plugin_arguments_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_client.cc (renamed from webkit/glue/plugins/test/plugin_client.cc)8
-rw-r--r--webkit/plugins/npapi/test/plugin_client.h (renamed from webkit/glue/plugins/test/plugin_client.h)10
-rw-r--r--webkit/plugins/npapi/test/plugin_create_instance_in_paint.cc (renamed from webkit/glue/plugins/test/plugin_create_instance_in_paint.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_create_instance_in_paint.h (renamed from webkit/glue/plugins/test/plugin_create_instance_in_paint.h)10
-rw-r--r--webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.cc (renamed from webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.h (renamed from webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_get_javascript_url2_test.cc (renamed from webkit/glue/plugins/test/plugin_get_javascript_url2_test.cc)4
-rw-r--r--webkit/plugins/npapi/test/plugin_get_javascript_url2_test.h (renamed from webkit/glue/plugins/test/plugin_get_javascript_url2_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_get_javascript_url_test.cc (renamed from webkit/glue/plugins/test/plugin_get_javascript_url_test.cc)4
-rw-r--r--webkit/plugins/npapi/test/plugin_get_javascript_url_test.h (renamed from webkit/glue/plugins/test/plugin_get_javascript_url_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_geturl_test.cc (renamed from webkit/glue/plugins/test/plugin_geturl_test.cc)2
-rw-r--r--webkit/plugins/npapi/test/plugin_geturl_test.h (renamed from webkit/glue/plugins/test/plugin_geturl_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_javascript_open_popup.cc (renamed from webkit/glue/plugins/test/plugin_javascript_open_popup.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_javascript_open_popup.h (renamed from webkit/glue/plugins/test/plugin_javascript_open_popup.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_new_fails_test.cc (renamed from webkit/glue/plugins/test/plugin_new_fails_test.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_new_fails_test.h (renamed from webkit/glue/plugins/test/plugin_new_fails_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_npobject_lifetime_test.cc (renamed from webkit/glue/plugins/test/plugin_npobject_lifetime_test.cc)4
-rw-r--r--webkit/plugins/npapi/test/plugin_npobject_lifetime_test.h (renamed from webkit/glue/plugins/test/plugin_npobject_lifetime_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_npobject_proxy_test.cc (renamed from webkit/glue/plugins/test/plugin_npobject_proxy_test.cc)4
-rw-r--r--webkit/plugins/npapi/test/plugin_npobject_proxy_test.h (renamed from webkit/glue/plugins/test/plugin_npobject_proxy_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_private_test.cc (renamed from webkit/glue/plugins/test/plugin_private_test.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_private_test.h (renamed from webkit/glue/plugins/test/plugin_private_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_schedule_timer_test.cc (renamed from webkit/glue/plugins/test/plugin_schedule_timer_test.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_schedule_timer_test.h (renamed from webkit/glue/plugins/test/plugin_schedule_timer_test.h)8
-rw-r--r--webkit/plugins/npapi/test/plugin_setup_test.cc (renamed from webkit/glue/plugins/test/plugin_setup_test.cc)4
-rw-r--r--webkit/plugins/npapi/test/plugin_setup_test.h (renamed from webkit/glue/plugins/test/plugin_setup_test.h)10
-rw-r--r--webkit/plugins/npapi/test/plugin_test.cc (renamed from webkit/glue/plugins/test/plugin_test.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_test.h (renamed from webkit/glue/plugins/test/plugin_test.h)8
-rw-r--r--webkit/plugins/npapi/test/plugin_test_factory.cc (renamed from webkit/glue/plugins/test/plugin_test_factory.cc)34
-rw-r--r--webkit/plugins/npapi/test/plugin_test_factory.h (renamed from webkit/glue/plugins/test/plugin_test_factory.h)6
-rw-r--r--webkit/plugins/npapi/test/plugin_thread_async_call_test.cc (renamed from webkit/glue/plugins/test/plugin_thread_async_call_test.cc)4
-rw-r--r--webkit/plugins/npapi/test/plugin_thread_async_call_test.h (renamed from webkit/glue/plugins/test/plugin_thread_async_call_test.h)8
-rw-r--r--webkit/plugins/npapi/test/plugin_window_size_test.cc (renamed from webkit/glue/plugins/test/plugin_window_size_test.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_window_size_test.h (renamed from webkit/glue/plugins/test/plugin_window_size_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_windowed_test.cc (renamed from webkit/glue/plugins/test/plugin_windowed_test.cc)6
-rw-r--r--webkit/plugins/npapi/test/plugin_windowed_test.h (renamed from webkit/glue/plugins/test/plugin_windowed_test.h)12
-rw-r--r--webkit/plugins/npapi/test/plugin_windowless_test.cc (renamed from webkit/glue/plugins/test/plugin_windowless_test.cc)4
-rw-r--r--webkit/plugins/npapi/test/plugin_windowless_test.h (renamed from webkit/glue/plugins/test/plugin_windowless_test.h)12
-rw-r--r--webkit/plugins/npapi/test/resource.h (renamed from webkit/glue/plugins/test/resource.h)2
-rw-r--r--webkit/plugins/npapi/webplugin.cc (renamed from webkit/glue/plugins/webplugin.cc)8
-rw-r--r--webkit/plugins/npapi/webplugin.h (renamed from webkit/glue/plugins/webplugin.h)14
-rw-r--r--webkit/plugins/npapi/webplugin_2d_device_delegate.cc (renamed from webkit/glue/plugins/webplugin_2d_device_delegate.cc)8
-rw-r--r--webkit/plugins/npapi/webplugin_2d_device_delegate.h (renamed from webkit/glue/plugins/webplugin_2d_device_delegate.h)12
-rw-r--r--webkit/plugins/npapi/webplugin_3d_device_delegate.cc (renamed from webkit/glue/plugins/webplugin_3d_device_delegate.cc)9
-rw-r--r--webkit/plugins/npapi/webplugin_3d_device_delegate.h (renamed from webkit/glue/plugins/webplugin_3d_device_delegate.h)12
-rw-r--r--webkit/plugins/npapi/webplugin_accelerated_surface_mac.h (renamed from webkit/glue/plugins/webplugin_accelerated_surface_mac.h)14
-rw-r--r--webkit/plugins/npapi/webplugin_audio_device_delegate.cc (renamed from webkit/glue/plugins/webplugin_audio_device_delegate.cc)9
-rw-r--r--webkit/plugins/npapi/webplugin_audio_device_delegate.h (renamed from webkit/glue/plugins/webplugin_audio_device_delegate.h)12
-rw-r--r--webkit/plugins/npapi/webplugin_delegate.cc (renamed from webkit/glue/plugins/webplugin_delegate.cc)9
-rw-r--r--webkit/plugins/npapi/webplugin_delegate.h (renamed from webkit/glue/plugins/webplugin_delegate.h)22
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl.cc (renamed from webkit/glue/plugins/webplugin_delegate_impl.cc)29
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl.h (renamed from webkit/glue/plugins/webplugin_delegate_impl.h)58
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc (renamed from webkit/glue/plugins/webplugin_delegate_impl_gtk.cc)26
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_mac.mm (renamed from webkit/glue/plugins/webplugin_delegate_impl_mac.mm)46
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl_win.cc (renamed from webkit/glue/plugins/webplugin_delegate_impl_win.cc)35
-rw-r--r--webkit/plugins/npapi/webplugin_file_delegate.cc (renamed from webkit/glue/plugins/webplugin_file_delegate.cc)8
-rw-r--r--webkit/plugins/npapi/webplugin_file_delegate.h (renamed from webkit/glue/plugins/webplugin_file_delegate.h)12
-rw-r--r--webkit/plugins/npapi/webplugin_impl.cc (renamed from webkit/glue/plugins/webplugin_impl.cc)19
-rw-r--r--webkit/plugins/npapi/webplugin_impl.h (renamed from webkit/glue/plugins/webplugin_impl.h)17
-rw-r--r--webkit/plugins/npapi/webplugin_impl_unittest.cc (renamed from webkit/glue/plugins/webplugin_impl_unittest.cc)20
-rw-r--r--webkit/plugins/npapi/webplugin_page_delegate.h (renamed from webkit/glue/plugins/webplugin_page_delegate.h)14
-rw-r--r--webkit/plugins/npapi/webplugin_print_delegate.cc (renamed from webkit/glue/plugins/webplugin_print_delegate.cc)8
-rw-r--r--webkit/plugins/npapi/webplugin_print_delegate.h (renamed from webkit/glue/plugins/webplugin_print_delegate.h)12
-rw-r--r--webkit/plugins/npapi/webplugininfo.cc (renamed from webkit/glue/plugins/webplugininfo.cc)8
-rw-r--r--webkit/plugins/npapi/webplugininfo.h (renamed from webkit/glue/plugins/webplugininfo.h)12
-rw-r--r--webkit/plugins/npapi/webview_plugin.cc (renamed from webkit/glue/plugins/webview_plugin.cc)8
-rw-r--r--webkit/plugins/npapi/webview_plugin.h (renamed from webkit/glue/plugins/webview_plugin.h)20
-rw-r--r--webkit/plugins/plugin_switches.cc6
-rw-r--r--webkit/plugins/plugin_switches.h6
-rw-r--r--webkit/plugins/ppapi/url_request_info_unittest.cc (renamed from webkit/glue/plugins/url_request_info_unittest.cc)0
-rw-r--r--webkit/support/platform_support_mac.mm4
-rw-r--r--webkit/support/test_webplugin_page_delegate.h14
-rw-r--r--webkit/support/webkit_support.cc16
-rw-r--r--webkit/support/webkit_support_glue.cc11
-rw-r--r--webkit/tools/test_shell/mac/test_webview_delegate.mm11
-rw-r--r--webkit/tools/test_shell/test_shell.cc27
-rw-r--r--webkit/tools/test_shell/test_shell.gypi120
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm4
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc27
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h39
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_gtk.cc17
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_win.cc12
-rw-r--r--webkit/tools/test_shell/webview_host.h6
-rw-r--r--webkit/tools/test_shell/webview_host_gtk.cc2
233 files changed, 2209 insertions, 1810 deletions
diff --git a/chrome/app/framework.order b/chrome/app/framework.order
index 71cb3d3..4ac4c01 100644
--- a/chrome/app/framework.order
+++ b/chrome/app/framework.order
@@ -30,13 +30,13 @@ __ZN22mac_plugin_interposing31NotifyBrowserOfPluginHideWindowEj6CGRect
__ZN22mac_plugin_interposing28NotifyPluginOfSetThemeCursorEPvm
__ZN22mac_plugin_interposing23NotifyPluginOfSetCursorEPvPK6Cursor
__ZN22mac_plugin_interposing23GetPluginWindowHasFocusEPv
-__ZN25CarbonPluginWindowTrackerC1Ev
-__ZN25CarbonPluginWindowTrackerC2Ev
-__ZN25CarbonPluginWindowTracker14SharedInstanceEv
-__ZN25CarbonPluginWindowTracker28CreateDummyWindowForDelegateEPv
-__ZNK25CarbonPluginWindowTracker25GetDelegateForDummyWindowEP15OpaqueWindowPtr
-__ZNK25CarbonPluginWindowTracker25GetDummyWindowForDelegateEPv
-__ZN25CarbonPluginWindowTracker29DestroyDummyWindowForDelegateEPvP15OpaqueWindowPtr
+__ZN6webkit5npapi25CarbonPluginWindowTrackerC1Ev
+__ZN6webkit5npapi25CarbonPluginWindowTrackerC2Ev
+__ZN6webkit5npapi25CarbonPluginWindowTracker14SharedInstanceEv
+__ZN6webkit5npapi25CarbonPluginWindowTracker28CreateDummyWindowForDelegateEPv
+__ZNK6webkit5npapi25CarbonPluginWindowTracker25GetDelegateForDummyWindowEP15OpaqueWindowPtr
+__ZNK6webkit5npapi25CarbonPluginWindowTracker25GetDummyWindowForDelegateEPv
+__ZN6webkit5npapi25CarbonPluginWindowTracker29DestroyDummyWindowForDelegateEPvP15OpaqueWindowPtr
__ZN7WebCore22narrowPrecisionToFloatIdEEfT_
__ZN7WebCore24narrowPrecisionToCGFloatIdEEfT_
__ZnwmPv
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc
index be9e2d2..4108f69 100644
--- a/chrome/browser/automation/automation_provider.cc
+++ b/chrome/browser/automation/automation_provider.cc
@@ -102,7 +102,6 @@
#include "chrome/browser/automation/ui_controls.h"
#include "views/event.h"
#include "webkit/glue/password_form.h"
-#include "webkit/glue/plugins/plugin_list.h"
#if defined(OS_WIN)
#include "chrome/browser/external_tab_container_win.h"
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index fcc609f..129dc8f 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -75,7 +75,7 @@
#include "net/base/cookie_store.h"
#include "net/url_request/url_request_context.h"
#include "views/event.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -2993,10 +2993,11 @@ void TestingAutomationProvider::GetPluginsInfo(
Browser* browser,
DictionaryValue* args,
IPC::Message* reply_message) {
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
ListValue* items = new ListValue;
- for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin();
+ for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it =
+ plugins.begin();
it != plugins.end();
++it) {
DictionaryValue* item = new DictionaryValue;
@@ -3007,7 +3008,7 @@ void TestingAutomationProvider::GetPluginsInfo(
item->SetBoolean("enabled", it->enabled);
// Add info about mime types.
ListValue* mime_types = new ListValue();
- for (std::vector<WebPluginMimeType>::const_iterator type_it =
+ for (std::vector<webkit::npapi::WebPluginMimeType>::const_iterator type_it =
it->mime_types.begin();
type_it != it->mime_types.end();
++type_it) {
@@ -3046,7 +3047,8 @@ void TestingAutomationProvider::EnablePlugin(Browser* browser,
if (!args->GetString("path", &path)) {
reply.SendError("path not specified.");
return;
- } else if (!NPAPI::PluginList::Singleton()->EnablePlugin(FilePath(path))) {
+ } else if (!webkit::npapi::PluginList::Singleton()->EnablePlugin(
+ FilePath(path))) {
reply.SendError(StringPrintf("Could not enable plugin for path %s.",
path.c_str()));
return;
@@ -3065,7 +3067,8 @@ void TestingAutomationProvider::DisablePlugin(Browser* browser,
if (!args->GetString("path", &path)) {
reply.SendError("path not specified.");
return;
- } else if (!NPAPI::PluginList::Singleton()->DisablePlugin(FilePath(path))) {
+ } else if (!webkit::npapi::PluginList::Singleton()->DisablePlugin(
+ FilePath(path))) {
reply.SendError(StringPrintf("Could not disable plugin for path %s.",
path.c_str()));
return;
diff --git a/chrome/browser/dom_ui/plugins_ui.cc b/chrome/browser/dom_ui/plugins_ui.cc
index 6746fdd..aaf59f1 100644
--- a/chrome/browser/dom_ui/plugins_ui.cc
+++ b/chrome/browser/dom_ui/plugins_ui.cc
@@ -32,7 +32,7 @@
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -223,7 +223,8 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) {
plugin_updater->EnablePluginGroup(enable, group_name);
if (enable) {
// See http://crbug.com/50105 for background.
- string16 adobereader = ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName);
+ string16 adobereader = ASCIIToUTF16(
+ webkit::npapi::PluginGroup::kAdobeReaderGroupName);
string16 internalpdf = ASCIIToUTF16(PepperPluginRegistry::kPDFPluginName);
if (group_name == adobereader) {
plugin_updater->EnablePluginGroup(false, internalpdf);
diff --git a/chrome/browser/gtk/content_setting_bubble_gtk.cc b/chrome/browser/gtk/content_setting_bubble_gtk.cc
index a53d69c..f8c36f0 100644
--- a/chrome/browser/gtk/content_setting_bubble_gtk.cc
+++ b/chrome/browser/gtk/content_setting_bubble_gtk.cc
@@ -27,7 +27,7 @@
#include "gfx/gtk_util.h"
#include "grit/app_resources.h"
#include "grit/generated_resources.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -109,7 +109,7 @@ void ContentSettingBubbleGtk::BuildBubble() {
for (std::set<std::string>::const_iterator it = plugins.begin();
it != plugins.end(); ++it) {
std::string name = UTF16ToUTF8(
- NPAPI::PluginList::Singleton()->GetPluginGroupName(*it));
+ webkit::npapi::PluginList::Singleton()->GetPluginGroupName(*it));
if (name.empty())
name = *it;
diff --git a/chrome/browser/hang_monitor/hung_plugin_action.cc b/chrome/browser/hang_monitor/hung_plugin_action.cc
index 8399464..9b719ca 100644
--- a/chrome/browser/hang_monitor/hung_plugin_action.cc
+++ b/chrome/browser/hang_monitor/hung_plugin_action.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/platform_util.h"
#include "chrome/common/logging_chrome.h"
#include "grit/generated_resources.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
HungPluginAction::HungPluginAction() : current_hung_plugin_window_(NULL) {
}
@@ -122,8 +122,8 @@ bool HungPluginAction::GetPluginName(HWND plugin_window,
// we have gone too far.
return false;
}
- if (WebPluginDelegateImpl::GetPluginNameFromWindow(window_to_check,
- plugin_name)) {
+ if (webkit::npapi::WebPluginDelegateImpl::GetPluginNameFromWindow(
+ window_to_check, plugin_name)) {
return true;
}
window_to_check = GetParent(window_to_check);
diff --git a/chrome/browser/metrics/metrics_log.cc b/chrome/browser/metrics/metrics_log.cc
index d0a1f01..bf54134 100644
--- a/chrome/browser/metrics/metrics_log.cc
+++ b/chrome/browser/metrics/metrics_log.cc
@@ -25,6 +25,7 @@
#include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h"
#include "googleurl/src/gurl.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
#define OPEN_ELEMENT_FOR_SCOPE(name) ScopedElement scoped_element(this, name)
@@ -237,12 +238,13 @@ void MetricsLog::WriteRealtimeStabilityAttributes(PrefService* pref) {
}
void MetricsLog::WritePluginList(
- const std::vector<WebPluginInfo>& plugin_list) {
+ const std::vector<webkit::npapi::WebPluginInfo>& plugin_list) {
DCHECK(!locked_);
OPEN_ELEMENT_FOR_SCOPE("plugins");
- for (std::vector<WebPluginInfo>::const_iterator iter = plugin_list.begin();
+ for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator iter =
+ plugin_list.begin();
iter != plugin_list.end(); ++iter) {
OPEN_ELEMENT_FOR_SCOPE("plugin");
@@ -262,7 +264,7 @@ void MetricsLog::WriteInstallElement() {
}
void MetricsLog::RecordEnvironment(
- const std::vector<WebPluginInfo>& plugin_list,
+ const std::vector<webkit::npapi::WebPluginInfo>& plugin_list,
const DictionaryValue* profile_metrics) {
DCHECK(!locked_);
diff --git a/chrome/browser/metrics/metrics_log.h b/chrome/browser/metrics/metrics_log.h
index 8f35705..0cb8b29 100644
--- a/chrome/browser/metrics/metrics_log.h
+++ b/chrome/browser/metrics/metrics_log.h
@@ -12,13 +12,18 @@
#include "base/basictypes.h"
#include "chrome/common/metrics_helpers.h"
#include "chrome/common/page_transition_types.h"
-#include "webkit/glue/plugins/webplugininfo.h"
struct AutocompleteLog;
class DictionaryValue;
class GURL;
class PrefService;
+namespace webkit {
+namespace npapi {
+struct WebPluginInfo;
+}
+}
+
class MetricsLog : public MetricsLogBase {
public:
// Creates a new metrics log
@@ -35,8 +40,9 @@ class MetricsLog : public MetricsLogBase {
// profile_metrics, if non-null, gives a dictionary of all profile metrics
// 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<WebPluginInfo>& plugin_list,
- const DictionaryValue* profile_metrics);
+ void RecordEnvironment(
+ const std::vector<webkit::npapi::WebPluginInfo>& plugin_list,
+ const DictionaryValue* profile_metrics);
// Records the input text, available choices, and selected entry when the
// user uses the Omnibox to open a URL.
@@ -80,7 +86,8 @@ class MetricsLog : public MetricsLogBase {
void WriteRealtimeStabilityAttributes(PrefService* pref);
// Writes the list of installed plugins.
- void WritePluginList(const std::vector<WebPluginInfo>& plugin_list);
+ void WritePluginList(
+ const std::vector<webkit::npapi::WebPluginInfo>& plugin_list);
// Within the profile group, write basic install info including appversion.
void WriteInstallElement();
diff --git a/chrome/browser/metrics/metrics_service.cc b/chrome/browser/metrics/metrics_service.cc
index 5aea04a..5e1af15 100644
--- a/chrome/browser/metrics/metrics_service.cc
+++ b/chrome/browser/metrics/metrics_service.cc
@@ -184,8 +184,8 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
#include "libxml/xmlwriter.h"
// TODO(port): port browser_distribution.h.
@@ -336,8 +336,9 @@ class MetricsMemoryDetails : public MemoryDetails {
class MetricsService::InitTaskComplete : public Task {
public:
- explicit InitTaskComplete(const std::string& hardware_class,
- const std::vector<WebPluginInfo>& plugins)
+ explicit InitTaskComplete(
+ const std::string& hardware_class,
+ const std::vector<webkit::npapi::WebPluginInfo>& plugins)
: hardware_class_(hardware_class), plugins_(plugins) {}
virtual void Run() {
@@ -347,7 +348,7 @@ class MetricsService::InitTaskComplete : public Task {
private:
std::string hardware_class_;
- std::vector<WebPluginInfo> plugins_;
+ std::vector<webkit::npapi::WebPluginInfo> plugins_;
};
class MetricsService::InitTask : public Task {
@@ -356,12 +357,12 @@ class MetricsService::InitTask : public Task {
: callback_loop_(callback_loop) {}
virtual void Run() {
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
std::string hardware_class; // Empty string by default.
#if defined(OS_CHROMEOS)
chromeos::SystemLibrary* system_library =
- chromeos::CrosLibrary::Get()->GetSystemLibrary();
+ chromeos::CrosLibrary::Get()->GetSystemLibrary();
system_library->GetMachineStatistic("hardware_class", &hardware_class);
#endif // OS_CHROMEOS
callback_loop_->PostTask(FROM_HERE, new InitTaskComplete(
@@ -801,7 +802,7 @@ void MetricsService::InitializeMetricsState() {
void MetricsService::OnInitTaskComplete(
const std::string& hardware_class,
- const std::vector<WebPluginInfo>& plugins) {
+ const std::vector<webkit::npapi::WebPluginInfo>& plugins) {
DCHECK(state_ == INIT_TASK_SCHEDULED);
hardware_class_ = hardware_class;
plugins_ = plugins;
diff --git a/chrome/browser/metrics/metrics_service.h b/chrome/browser/metrics/metrics_service.h
index f1cfbb2..fa15a12 100644
--- a/chrome/browser/metrics/metrics_service.h
+++ b/chrome/browser/metrics/metrics_service.h
@@ -33,7 +33,12 @@ class HistogramSynchronizer;
class MetricsLogBase;
class PrefService;
class TemplateURLModel;
+
+namespace webkit {
+namespace npapi {
struct WebPluginInfo;
+}
+}
// Forward declaration of the xmlNode to avoid having tons of gyp files
// needing to depend on the libxml third party lib.
@@ -155,7 +160,7 @@ class MetricsService : public NotificationObserver,
// Callback to let us know that the init task is done.
void OnInitTaskComplete(
const std::string& hardware_class,
- const std::vector<WebPluginInfo>& plugins);
+ const std::vector<webkit::npapi::WebPluginInfo>& plugins);
// When we start a new version of Chromium (different from our last run), we
// need to discard the old crash stats so that we don't attribute crashes etc.
@@ -418,7 +423,7 @@ class MetricsService : public NotificationObserver,
std::string hardware_class_;
// The list of plugins which was retrieved on the file thread.
- std::vector<WebPluginInfo> plugins_;
+ std::vector<webkit::npapi::WebPluginInfo> plugins_;
// The outstanding transmission appears as a URL Fetch operation.
scoped_ptr<URLFetcher> current_fetch_;
diff --git a/chrome/browser/mock_plugin_exceptions_table_model.cc b/chrome/browser/mock_plugin_exceptions_table_model.cc
index 77b2a2f..1c88524 100644
--- a/chrome/browser/mock_plugin_exceptions_table_model.cc
+++ b/chrome/browser/mock_plugin_exceptions_table_model.cc
@@ -5,11 +5,11 @@
#include "chrome/browser/mock_plugin_exceptions_table_model.h"
void MockPluginExceptionsTableModel::set_plugins(
- std::vector<PluginGroup>& plugins) {
+ std::vector<webkit::npapi::PluginGroup>& plugins) {
plugins_ = plugins;
}
void MockPluginExceptionsTableModel::GetPlugins(
- std::vector<PluginGroup>* plugin_groups) {
+ std::vector<webkit::npapi::PluginGroup>* plugin_groups) {
*plugin_groups = plugins_;
}
diff --git a/chrome/browser/mock_plugin_exceptions_table_model.h b/chrome/browser/mock_plugin_exceptions_table_model.h
index 15a1c5b..c63d67f 100644
--- a/chrome/browser/mock_plugin_exceptions_table_model.h
+++ b/chrome/browser/mock_plugin_exceptions_table_model.h
@@ -17,13 +17,14 @@ class MockPluginExceptionsTableModel : public PluginExceptionsTableModel {
: PluginExceptionsTableModel(map, otr_map) {}
virtual ~MockPluginExceptionsTableModel() {}
- void set_plugins(std::vector<PluginGroup>& plugins);
+ void set_plugins(std::vector<webkit::npapi::PluginGroup>& plugins);
protected:
- virtual void GetPlugins(std::vector<PluginGroup>* plugin_groups);
+ virtual void GetPlugins(
+ std::vector<webkit::npapi::PluginGroup>* plugin_groups);
private:
- std::vector<PluginGroup> plugins_;
+ std::vector<webkit::npapi::PluginGroup> plugins_;
};
#endif // CHROME_BROWSER_MOCK_PLUGIN_EXCEPTIONS_TABLE_MODEL_H_
diff --git a/chrome/browser/plugin_carbon_interpose_mac.cc b/chrome/browser/plugin_carbon_interpose_mac.cc
index 55e1405..2b60d66 100644
--- a/chrome/browser/plugin_carbon_interpose_mac.cc
+++ b/chrome/browser/plugin_carbon_interpose_mac.cc
@@ -8,7 +8,7 @@
#include "chrome/plugin/plugin_interpose_util_mac.h"
#include "gfx/rect.h"
-#include "webkit/glue/plugins/carbon_plugin_window_tracker_mac.h"
+#include "webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
@@ -61,16 +61,16 @@ static void OnPluginWindowSelected(WindowRef window) {
static Boolean ChromePluginIsWindowActive(WindowRef window) {
const OpaquePluginRef delegate =
- CarbonPluginWindowTracker::SharedInstance()->GetDelegateForDummyWindow(
- window);
+ webkit::npapi::CarbonPluginWindowTracker::SharedInstance()->
+ GetDelegateForDummyWindow(window);
return delegate ? IsContainingWindowActive(delegate)
: IsWindowActive(window);
}
static Boolean ChromePluginIsWindowHilited(WindowRef window) {
const OpaquePluginRef delegate =
- CarbonPluginWindowTracker::SharedInstance()->GetDelegateForDummyWindow(
- window);
+ webkit::npapi::CarbonPluginWindowTracker::SharedInstance()->
+ GetDelegateForDummyWindow(window);
return delegate ? IsContainingWindowActive(delegate)
: IsWindowHilited(window);
}
@@ -126,8 +126,8 @@ static void ChromePluginDisposeDialog(DialogRef dialog) {
static WindowPartCode ChromePluginFindWindow(Point point, WindowRef* window) {
OpaquePluginRef delegate = mac_plugin_interposing::GetActiveDelegate();
- CarbonPluginWindowTracker* tracker =
- CarbonPluginWindowTracker::SharedInstance();
+ webkit::npapi::CarbonPluginWindowTracker* tracker =
+ webkit::npapi::CarbonPluginWindowTracker::SharedInstance();
WindowRef plugin_window = tracker->GetDummyWindowForDelegate(delegate);
if (plugin_window) {
// If plugin_window is non-NULL, then we are in the middle of routing an
diff --git a/chrome/browser/plugin_data_remover.cc b/chrome/browser/plugin_data_remover.cc
index 74aa07c..fd7d9bd 100644
--- a/chrome/browser/plugin_data_remover.cc
+++ b/chrome/browser/plugin_data_remover.cc
@@ -10,8 +10,8 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/plugin_service.h"
#include "chrome/common/plugin_messages.h"
-#include "webkit/glue/plugins/plugin_group.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_group.h"
+#include "webkit/plugins/npapi/plugin_list.h"
#if defined(OS_POSIX)
#include "ipc/ipc_channel_posix.h"
@@ -65,7 +65,8 @@ bool PluginDataRemover::OffTheRecord() {
return false;
}
-void PluginDataRemover::SetPluginInfo(const WebPluginInfo& info) {
+void PluginDataRemover::SetPluginInfo(
+ const webkit::npapi::WebPluginInfo& info) {
}
void PluginDataRemover::OnChannelOpened(const IPC::ChannelHandle& handle) {
@@ -142,16 +143,16 @@ void PluginDataRemover::SignalDone() {
bool PluginDataRemover::IsSupported() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
bool allow_wildcard = false;
- WebPluginInfo plugin;
+ webkit::npapi::WebPluginInfo plugin;
std::string mime_type;
- if (!NPAPI::PluginList::Singleton()->GetPluginInfo(GURL(),
- g_flash_mime_type,
- allow_wildcard,
- &plugin,
- &mime_type))
+ if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(GURL(),
+ g_flash_mime_type,
+ allow_wildcard,
+ &plugin,
+ &mime_type))
return false;
scoped_ptr<Version> version(
- PluginGroup::CreateVersionFromString(plugin.version));
+ webkit::npapi::PluginGroup::CreateVersionFromString(plugin.version));
scoped_ptr<Version> min_version(
Version::GetVersionFromString(g_min_flash_version));
return plugin.enabled &&
diff --git a/chrome/browser/plugin_data_remover.h b/chrome/browser/plugin_data_remover.h
index 03b7e6f..58387fe 100644
--- a/chrome/browser/plugin_data_remover.h
+++ b/chrome/browser/plugin_data_remover.h
@@ -41,7 +41,7 @@ class PluginDataRemover : public base::RefCountedThreadSafe<PluginDataRemover>,
// PluginProcessHost::Client methods
virtual int ID();
virtual bool OffTheRecord();
- virtual void SetPluginInfo(const WebPluginInfo& info);
+ virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info);
virtual void OnChannelOpened(const IPC::ChannelHandle& handle);
virtual void OnError();
diff --git a/chrome/browser/plugin_exceptions_table_model.cc b/chrome/browser/plugin_exceptions_table_model.cc
index 7ad5b13..5b2a2c1 100644
--- a/chrome/browser/plugin_exceptions_table_model.cc
+++ b/chrome/browser/plugin_exceptions_table_model.cc
@@ -134,13 +134,13 @@ void PluginExceptionsTableModel::ClearSettings() {
}
void PluginExceptionsTableModel::GetPlugins(
- std::vector<PluginGroup>* plugin_groups) {
- NPAPI::PluginList::Singleton()->GetPluginGroups(false, plugin_groups);
+ std::vector<webkit::npapi::PluginGroup>* plugin_groups) {
+ webkit::npapi::PluginList::Singleton()->GetPluginGroups(false, plugin_groups);
}
void PluginExceptionsTableModel::LoadSettings() {
int group_id = 0;
- std::vector<PluginGroup> plugins;
+ std::vector<webkit::npapi::PluginGroup> plugins;
GetPlugins(&plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
std::string plugin = plugins[i].identifier();
diff --git a/chrome/browser/plugin_exceptions_table_model.h b/chrome/browser/plugin_exceptions_table_model.h
index d345b95..045c218 100644
--- a/chrome/browser/plugin_exceptions_table_model.h
+++ b/chrome/browser/plugin_exceptions_table_model.h
@@ -13,7 +13,7 @@
#include "chrome/browser/content_settings/host_content_settings_map.h"
#include "chrome/browser/remove_rows_table_model.h"
#include "chrome/common/notification_observer.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
struct WebPluginInfo;
@@ -48,7 +48,8 @@ class PluginExceptionsTableModel : public RemoveRowsTableModel,
protected:
// Subclasses can override this method for testing.
- virtual void GetPlugins(std::vector<PluginGroup>* plugin_groups);
+ virtual void GetPlugins(
+ std::vector<webkit::npapi::PluginGroup>* plugin_groups);
private:
friend class PluginExceptionsTableModelTest;
diff --git a/chrome/browser/plugin_exceptions_table_model_unittest.cc b/chrome/browser/plugin_exceptions_table_model_unittest.cc
index b96f3fb..e7efcca 100644
--- a/chrome/browser/plugin_exceptions_table_model_unittest.cc
+++ b/chrome/browser/plugin_exceptions_table_model_unittest.cc
@@ -13,8 +13,8 @@
#include "chrome/test/testing_profile.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/plugins/plugin_group.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_group.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
// Can't be an internal namespace because PluginExceptionsTableModel declares
// as a friend.
@@ -85,21 +85,21 @@ class PluginExceptionsTableModelTest : public testing::Test {
table_model_.reset(new MockPluginExceptionsTableModel(map, NULL));
- std::vector<PluginGroup> plugins;
- WebPluginInfo foo_plugin;
+ std::vector<webkit::npapi::PluginGroup> plugins;
+ webkit::npapi::WebPluginInfo foo_plugin;
foo_plugin.path = FilePath(FILE_PATH_LITERAL("a-foo"));
foo_plugin.name = ASCIIToUTF16("FooPlugin");
foo_plugin.enabled = true;
- scoped_ptr<PluginGroup> foo_group(
- PluginGroup::FromWebPluginInfo(foo_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> foo_group(
+ webkit::npapi::PluginGroup::FromWebPluginInfo(foo_plugin));
plugins.push_back(*foo_group);
- WebPluginInfo bar_plugin;
+ webkit::npapi::WebPluginInfo bar_plugin;
bar_plugin.path = FilePath(FILE_PATH_LITERAL("b-bar"));
bar_plugin.name = ASCIIToUTF16("BarPlugin");
bar_plugin.enabled = true;
- scoped_ptr<PluginGroup> bar_group(
- PluginGroup::FromWebPluginInfo(bar_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> bar_group(
+ webkit::npapi::PluginGroup::FromWebPluginInfo(bar_plugin));
plugins.push_back(*bar_group);
table_model_->set_plugins(plugins);
diff --git a/chrome/browser/plugin_installer.cc b/chrome/browser/plugin_installer.cc
index b6ceb3c..8d63679 100644
--- a/chrome/browser/plugin_installer.cc
+++ b/chrome/browser/plugin_installer.cc
@@ -12,7 +12,7 @@
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
#include "grit/theme_resources.h"
-#include "webkit/glue/plugins/default_plugin_shared.h"
+#include "webkit/plugins/npapi/default_plugin_shared.h"
// The URL for the "Problems installing" page for the Plugins infobar.
static const char kLearnMorePluginInstallerUrl[] =
@@ -30,11 +30,11 @@ PluginInstaller::~PluginInstaller() {
void PluginInstaller::OnMissingPluginStatus(int status) {
switch (status) {
- case default_plugin::MISSING_PLUGIN_AVAILABLE: {
+ case webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE: {
tab_contents_->AddInfoBar(this);
break;
}
- case default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: {
+ case webkit::npapi::default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: {
// Hide the InfoBar if user already started download/install of the
// missing plugin.
tab_contents_->RemoveInfoBar(this);
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index 0e7735a..72d8aed 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -169,7 +169,7 @@ PluginProcessHost::~PluginProcessHost() {
CancelRequests();
}
-bool PluginProcessHost::Init(const WebPluginInfo& info,
+bool PluginProcessHost::Init(const webkit::npapi::WebPluginInfo& info,
const std::string& locale) {
info_ = info;
set_name(UTF16ToWideHack(info_.name));
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index 89e368a..b98840e 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -18,7 +18,7 @@
#include "chrome/browser/browser_child_process_host.h"
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
#include "gfx/native_widget_types.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
namespace gfx {
class Rect;
@@ -47,7 +47,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
// the channel.
virtual int ID() = 0;
virtual bool OffTheRecord() = 0;
- virtual void SetPluginInfo(const WebPluginInfo& info) = 0;
+ virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) = 0;
// The client should delete itself when one of these methods is called.
virtual void OnChannelOpened(const IPC::ChannelHandle& handle) = 0;
virtual void OnError() = 0;
@@ -61,7 +61,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
// Initialize the new plugin process, returning true on success. This must
// be called before the object can be used.
- bool Init(const WebPluginInfo& info, const std::string& locale);
+ bool Init(const webkit::npapi::WebPluginInfo& info, const std::string& locale);
// Force the plugin process to shutdown (cleanly).
virtual void ForceShutdown();
@@ -92,7 +92,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
void OnAppActivation();
#endif
- const WebPluginInfo& info() const { return info_; }
+ const webkit::npapi::WebPluginInfo& info() const { return info_; }
#if defined(OS_WIN)
// Tracks plugin parent windows created on the browser UI thread.
@@ -150,7 +150,7 @@ class PluginProcessHost : public BrowserChildProcessHost,
std::queue<Client*> sent_requests_;
// Information about the plugin.
- WebPluginInfo info_;
+ webkit::npapi::WebPluginInfo info_;
// Helper class for handling PluginProcessHost_ResolveProxy messages (manages
// the requests to the proxy service).
diff --git a/chrome/browser/plugin_service.cc b/chrome/browser/plugin_service.cc
index 548bd3c..50677f7 100644
--- a/chrome/browser/plugin_service.cc
+++ b/chrome/browser/plugin_service.cc
@@ -34,12 +34,13 @@
#include "chrome/common/plugin_messages.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/render_messages.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
+
#ifndef DISABLE_NACL
#include "native_client/src/trusted/plugin/nacl_entry_points.h"
#endif
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugininfo.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/plugin_selection_policy.h"
@@ -94,10 +95,10 @@ PluginService::PluginService()
const CommandLine* command_line = CommandLine::ForCurrentProcess();
FilePath path = command_line->GetSwitchValuePath(switches::kLoadPlugin);
if (!path.empty())
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
path = command_line->GetSwitchValuePath(switches::kExtraPluginDir);
if (!path.empty())
- NPAPI::PluginList::Singleton()->AddExtraPluginDir(path);
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(path);
chrome::RegisterInternalDefaultPlugin();
@@ -105,7 +106,7 @@ PluginService::PluginService()
if (!CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableInternalFlash) &&
PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) {
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(path);
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
}
#ifndef DISABLE_NACL
@@ -123,9 +124,9 @@ PluginService::PluginService()
#if defined(OS_WIN)
hkcu_key_.Create(
- HKEY_CURRENT_USER, kRegistryMozillaPlugins, KEY_NOTIFY);
+ HKEY_CURRENT_USER, webkit::npapi::kRegistryMozillaPlugins, KEY_NOTIFY);
hklm_key_.Create(
- HKEY_LOCAL_MACHINE, kRegistryMozillaPlugins, KEY_NOTIFY);
+ HKEY_LOCAL_MACHINE, webkit::npapi::kRegistryMozillaPlugins, KEY_NOTIFY);
if (hkcu_key_.StartWatching()) {
hkcu_event_.reset(new base::WaitableEvent(hkcu_key_.watch_event()));
hkcu_watcher_.StartWatching(hkcu_event_.get(), this);
@@ -140,7 +141,7 @@ PluginService::PluginService()
// e.g. ~/.config/chromium/Plugins.
FilePath user_data_dir;
if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
- NPAPI::PluginList::Singleton()->AddExtraPluginDir(
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(
user_data_dir.Append("Plugins"));
}
#endif
@@ -212,9 +213,9 @@ PluginProcessHost* PluginService::FindOrStartPluginProcess(
if (plugin_host)
return plugin_host;
- WebPluginInfo info;
- if (!NPAPI::PluginList::Singleton()->GetPluginInfoByPath(
- plugin_path, &info)) {
+ webkit::npapi::WebPluginInfo info;
+ if (!webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath(
+ plugin_path, &info)) {
return NULL;
}
@@ -246,7 +247,7 @@ void PluginService::GetAllowedPluginForOpenChannelToPlugin(
const std::string& mime_type,
PluginProcessHost::Client* client) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
bool found = GetFirstAllowedPluginInfo(url, mime_type, &info, NULL);
FilePath plugin_path;
if (found && info.enabled)
@@ -275,16 +276,16 @@ void PluginService::FinishOpenChannelToPlugin(
bool PluginService::GetFirstAllowedPluginInfo(
const GURL& url,
const std::string& mime_type,
- WebPluginInfo* info,
+ webkit::npapi::WebPluginInfo* info,
std::string* actual_mime_type) {
// GetPluginInfoArray may need to load the plugins, so we need to be
// on the FILE thread.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
bool allow_wildcard = true;
#if defined(OS_CHROMEOS)
- std::vector<WebPluginInfo> info_array;
+ std::vector<webkit::npapi::WebPluginInfo> info_array;
std::vector<std::string> actual_mime_types;
- NPAPI::PluginList::Singleton()->GetPluginInfoArray(
+ webkit::npapi::PluginList::Singleton()->GetPluginInfoArray(
url, mime_type, allow_wildcard, &info_array, &actual_mime_types);
// Now we filter by the plugin selection policy.
@@ -298,7 +299,7 @@ bool PluginService::GetFirstAllowedPluginInfo(
}
return false;
#else
- return NPAPI::PluginList::Singleton()->GetPluginInfo(
+ return webkit::npapi::PluginList::Singleton()->GetPluginInfo(
url, mime_type, allow_wildcard, info, actual_mime_type);
#endif
}
@@ -319,7 +320,7 @@ void PluginService::OnWaitableEventSignaled(
hklm_key_.StartWatching();
}
- NPAPI::PluginList::Singleton()->RefreshPlugins();
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins();
PurgePluginListCache(true);
#endif // defined(OS_WIN)
}
@@ -340,8 +341,8 @@ void PluginService::Observe(NotificationType type,
bool plugins_changed = false;
for (size_t i = 0; i < extension->plugins().size(); ++i) {
const Extension::PluginInfo& plugin = extension->plugins()[i];
- NPAPI::PluginList::Singleton()->RefreshPlugins();
- NPAPI::PluginList::Singleton()->AddExtraPluginPath(plugin.path);
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins();
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(plugin.path);
plugins_changed = true;
if (!plugin.is_public)
private_plugins_[plugin.path] = extension->url();
@@ -359,8 +360,9 @@ void PluginService::Observe(NotificationType type,
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
NewRunnableFunction(&ForceShutdownPlugin,
plugin.path));
- NPAPI::PluginList::Singleton()->RefreshPlugins();
- NPAPI::PluginList::Singleton()->RemoveExtraPluginPath(plugin.path);
+ webkit::npapi::PluginList::Singleton()->RefreshPlugins();
+ webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath(
+ plugin.path);
plugins_changed = true;
if (!plugin.is_public)
private_plugins_.erase(plugin.path);
@@ -407,7 +409,7 @@ void PluginService::RegisterPepperPlugins() {
std::vector<PepperPluginInfo> plugins;
PepperPluginRegistry::GetList(&plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
- NPAPI::PluginVersionInfo info;
+ webkit::npapi::PluginVersionInfo info;
info.path = plugins[i].path;
info.product_name = plugins[i].name.empty() ?
plugins[i].path.BaseName().ToWStringHack() :
@@ -422,6 +424,6 @@ void PluginService::RegisterPepperPlugins() {
// or perhaps refactor the PluginList to be less specific to NPAPI.
memset(&info.entry_points, 0, sizeof(info.entry_points));
- NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info);
+ webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info);
}
}
diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h
index e83e804..a66d76ac 100644
--- a/chrome/browser/plugin_service.h
+++ b/chrome/browser/plugin_service.h
@@ -41,7 +41,13 @@ class MessageLoop;
class Profile;
class ResourceDispatcherHost;
class URLRequestContext;
+
+
+namespace webkit {
+namespace npapi {
struct WebPluginInfo;
+}
+}
// This must be created on the main thread but it's only called on the IO/file
// thread.
@@ -90,7 +96,7 @@ class PluginService
// the given url and mime type. Must be called on the FILE thread.
bool GetFirstAllowedPluginInfo(const GURL& url,
const std::string& mime_type,
- WebPluginInfo* info,
+ webkit::npapi::WebPluginInfo* info,
std::string* actual_mime_type);
// Returns true if the given plugin is allowed to be used by a page with
diff --git a/chrome/browser/plugin_service_browsertest.cc b/chrome/browser/plugin_service_browsertest.cc
index 8d9e82e..5fed897 100644
--- a/chrome/browser/plugin_service_browsertest.cc
+++ b/chrome/browser/plugin_service_browsertest.cc
@@ -11,7 +11,7 @@
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gmock/include/gmock/gmock.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -26,7 +26,7 @@ class MockPluginProcessHostClient : public PluginProcessHost::Client {
MOCK_METHOD0(ID, int());
MOCK_METHOD0(OffTheRecord, bool());
- MOCK_METHOD1(SetPluginInfo, void(const WebPluginInfo& info));
+ MOCK_METHOD1(SetPluginInfo, void(const webkit::npapi::WebPluginInfo& info));
MOCK_METHOD1(OnChannelOpened, void(const IPC::ChannelHandle& handle));
MOCK_METHOD0(OnError, void());
@@ -73,10 +73,10 @@ IN_PROC_BROWSER_TEST_F(PluginServiceTest, StartAndFindPluginProcess) {
// calls to FindPluginProcess should return non-zero values.
PluginProcessHost* default_plugin_process_host =
plugin_service_->FindOrStartPluginProcess(
- FilePath(kDefaultPluginLibraryName));
+ FilePath(webkit::npapi::kDefaultPluginLibraryName));
- EXPECT_EQ(default_plugin_process_host,
- plugin_service_->FindPluginProcess(FilePath(kDefaultPluginLibraryName)));
+ EXPECT_EQ(default_plugin_process_host, plugin_service_->FindPluginProcess(
+ FilePath(webkit::npapi::kDefaultPluginLibraryName)));
}
IN_PROC_BROWSER_TEST_F(PluginServiceTest, OpenChannelToPlugin) {
@@ -95,7 +95,7 @@ IN_PROC_BROWSER_TEST_F(PluginServiceTest, GetFirstAllowedPluginInfo) {
// We should always get a positive response no matter whether we really have
// a plugin to support that particular mime type because the Default plugin
// supports all mime types.
- WebPluginInfo plugin_info;
+ webkit::npapi::WebPluginInfo plugin_info;
std::string plugin_mime_type;
plugin_service_->GetFirstAllowedPluginInfo(GURL("http://google.com/"),
"application/pdf",
diff --git a/chrome/browser/plugin_service_unittest.cc b/chrome/browser/plugin_service_unittest.cc
index 4e54526..6950d2a 100644
--- a/chrome/browser/plugin_service_unittest.cc
+++ b/chrome/browser/plugin_service_unittest.cc
@@ -9,7 +9,6 @@
#include "chrome/browser/browser_thread.h"
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/plugins/plugin_list.h"
namespace {
diff --git a/chrome/browser/plugin_updater.cc b/chrome/browser/plugin_updater.cc
index 40f3be1..d994efd 100644
--- a/chrome/browser/plugin_updater.cc
+++ b/chrome/browser/plugin_updater.cc
@@ -22,7 +22,8 @@
#include "chrome/common/notification_service.h"
#include "chrome/common/pepper_plugin_registry.h"
#include "chrome/common/pref_names.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
// How long to wait to save the plugin enabled information, which might need to
// go to disk.
@@ -34,7 +35,7 @@ PluginUpdater::PluginUpdater()
}
DictionaryValue* PluginUpdater::CreatePluginFileSummary(
- const WebPluginInfo& plugin) {
+ const webkit::npapi::WebPluginInfo& plugin) {
DictionaryValue* data = new DictionaryValue();
data->SetString("path", plugin.path.value());
data->SetString("name", plugin.name);
@@ -45,8 +46,8 @@ DictionaryValue* PluginUpdater::CreatePluginFileSummary(
// static
ListValue* PluginUpdater::GetPluginGroupsData() {
- std::vector<PluginGroup> plugin_groups;
- NPAPI::PluginList::Singleton()->GetPluginGroups(true, &plugin_groups);
+ std::vector<webkit::npapi::PluginGroup> plugin_groups;
+ webkit::npapi::PluginList::Singleton()->GetPluginGroups(true, &plugin_groups);
// Construct DictionaryValues to return to the UI
ListValue* plugin_groups_data = new ListValue();
@@ -57,19 +58,20 @@ ListValue* PluginUpdater::GetPluginGroupsData() {
}
void PluginUpdater::EnablePluginGroup(bool enable, const string16& group_name) {
- if (PluginGroup::IsPluginNameDisabledByPolicy(group_name))
+ if (webkit::npapi::PluginGroup::IsPluginNameDisabledByPolicy(group_name))
enable = false;
- NPAPI::PluginList::Singleton()->EnableGroup(enable, group_name);
+ webkit::npapi::PluginList::Singleton()->EnableGroup(enable, group_name);
NotifyPluginStatusChanged();
}
void PluginUpdater::EnablePluginFile(bool enable,
const FilePath::StringType& path) {
FilePath file_path(path);
- if (enable && !PluginGroup::IsPluginPathDisabledByPolicy(file_path))
- NPAPI::PluginList::Singleton()->EnablePlugin(file_path);
+ if (enable &&
+ !webkit::npapi::PluginGroup::IsPluginPathDisabledByPolicy(file_path))
+ webkit::npapi::PluginList::Singleton()->EnablePlugin(file_path);
else
- NPAPI::PluginList::Singleton()->DisablePlugin(file_path);
+ webkit::npapi::PluginList::Singleton()->DisablePlugin(file_path);
NotifyPluginStatusChanged();
}
@@ -105,7 +107,8 @@ void PluginUpdater::DisablePluginsFromPolicy(const ListValue* plugin_names) {
}
}
}
- PluginGroup::SetPolicyDisabledPluginPatterns(policy_disabled_plugin_patterns);
+ webkit::npapi::PluginGroup::SetPolicyDisabledPluginPatterns(
+ policy_disabled_plugin_patterns);
NotifyPluginStatusChanged();
}
@@ -190,7 +193,7 @@ void PluginUpdater::DisablePluginGroupsFromPrefs(Profile* profile) {
}
}
if (!enabled)
- NPAPI::PluginList::Singleton()->DisablePlugin(plugin_path);
+ webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_path);
} else if (!enabled && plugin->GetString("name", &group_name)) {
// Don't disable this group if it's for the pdf plugin and we just
// forced it on.
@@ -213,13 +216,14 @@ void PluginUpdater::DisablePluginGroupsFromPrefs(Profile* profile) {
!force_internal_pdf_for_this_run) {
// The internal PDF plugin is disabled by default, and the user hasn't
// overridden the default.
- NPAPI::PluginList::Singleton()->DisablePlugin(pdf_path);
+ webkit::npapi::PluginList::Singleton()->DisablePlugin(pdf_path);
EnablePluginGroup(false, pdf_group_name);
}
if (force_enable_internal_pdf) {
// See http://crbug.com/50105 for background.
- EnablePluginGroup(false, ASCIIToUTF16(PluginGroup::kAdobeReaderGroupName));
+ EnablePluginGroup(false, ASCIIToUTF16(
+ webkit::npapi::PluginGroup::kAdobeReaderGroupName));
// We want to save this, but doing so requires loading the list of plugins,
// so do it after a minute as to not impact startup performance. Note that
@@ -237,11 +241,11 @@ void PluginUpdater::UpdatePreferences(Profile* profile, int delay_ms) {
}
void PluginUpdater::GetPreferencesDataOnFileThread(void* profile) {
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
- std::vector<PluginGroup> groups;
- NPAPI::PluginList::Singleton()->GetPluginGroups(false, &groups);
+ std::vector<webkit::npapi::PluginGroup> groups;
+ webkit::npapi::PluginList::Singleton()->GetPluginGroups(false, &groups);
BrowserThread::PostTask(
BrowserThread::UI,
@@ -253,8 +257,8 @@ void PluginUpdater::GetPreferencesDataOnFileThread(void* profile) {
void PluginUpdater::OnUpdatePreferences(
Profile* profile,
- const std::vector<WebPluginInfo>& plugins,
- const std::vector<PluginGroup>& groups) {
+ const std::vector<webkit::npapi::WebPluginInfo>& plugins,
+ const std::vector<webkit::npapi::PluginGroup>& groups) {
ListValue* plugins_list = profile->GetPrefs()->GetMutableList(
prefs::kPluginsPluginsList);
plugins_list->Clear();
@@ -265,7 +269,8 @@ void PluginUpdater::OnUpdatePreferences(
internal_dir);
// Add the plugin files.
- for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin();
+ for (std::vector<webkit::npapi::WebPluginInfo>::const_iterator it =
+ plugins.begin();
it != plugins.end();
++it) {
plugins_list->Append(CreatePluginFileSummary(*it));
diff --git a/chrome/browser/plugin_updater.h b/chrome/browser/plugin_updater.h
index 5264334..dc18595 100644
--- a/chrome/browser/plugin_updater.h
+++ b/chrome/browser/plugin_updater.h
@@ -12,15 +12,19 @@
#include "base/file_path.h"
#include "base/singleton.h"
#include "chrome/common/notification_observer.h"
-#include "webkit/glue/plugins/plugin_list.h"
class DictionaryValue;
class ListValue;
class NotificationDetails;
class NotificationSource;
-class PluginGroup;
class Profile;
+
+namespace webkit {
+namespace npapi {
+class PluginGroup;
struct WebPluginInfo;
+}
+}
class PluginUpdater : public NotificationObserver {
public:
@@ -58,8 +62,8 @@ class PluginUpdater : public NotificationObserver {
// Called on the UI thread with the plugin data to save the preferences.
static void OnUpdatePreferences(
Profile* profile,
- const std::vector<WebPluginInfo>& plugins,
- const std::vector<PluginGroup>& groups);
+ const std::vector<webkit::npapi::WebPluginInfo>& plugins,
+ const std::vector<webkit::npapi::PluginGroup>& groups);
// Queues sending the notification that plugin data has changed. This is done
// so that if a bunch of changes happen, we only send one notification.
@@ -68,7 +72,8 @@ class PluginUpdater : public NotificationObserver {
// Used for the post task to notify that plugin enabled status changed.
static void OnNotifyPluginStatusChanged();
- static DictionaryValue* CreatePluginFileSummary(const WebPluginInfo& plugin);
+ static DictionaryValue* CreatePluginFileSummary(
+ const webkit::npapi::WebPluginInfo& plugin);
// Force plugins to be disabled due to policy. |plugins| contains
// the list of StringValues of the names of the policy-disabled plugins.
diff --git a/chrome/browser/renderer_host/accelerated_surface_container_mac.cc b/chrome/browser/renderer_host/accelerated_surface_container_mac.cc
index 1a7c07c..f379931 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_mac.cc
+++ b/chrome/browser/renderer_host/accelerated_surface_container_mac.cc
@@ -7,7 +7,7 @@
#include "app/surface/io_surface_support_mac.h"
#include "base/logging.h"
#include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/webplugin.h"
AcceleratedSurfaceContainerMac::AcceleratedSurfaceContainerMac(
AcceleratedSurfaceContainerManagerMac* manager,
@@ -51,7 +51,7 @@ void AcceleratedSurfaceContainerMac::SetSizeAndTransportDIB(
}
void AcceleratedSurfaceContainerMac::SetGeometry(
- const webkit_glue::WebPluginGeometry& geom) {
+ const webkit::npapi::WebPluginGeometry& geom) {
visible_ = geom.visible;
if (geom.rects_valid)
clip_rect_ = geom.clip_rect;
diff --git a/chrome/browser/renderer_host/accelerated_surface_container_mac.h b/chrome/browser/renderer_host/accelerated_surface_container_mac.h
index deda9ef..45979e0 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_mac.h
+++ b/chrome/browser/renderer_host/accelerated_surface_container_mac.h
@@ -36,9 +36,11 @@
#include "gfx/native_widget_types.h"
#include "gfx/rect.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
struct WebPluginGeometry;
}
+}
class AcceleratedSurfaceContainerManagerMac;
@@ -65,7 +67,7 @@ class AcceleratedSurfaceContainerMac {
// currently only pays attention to the clip width and height, since the
// view in which it is hosted is responsible for positioning it on the
// page.)
- void SetGeometry(const webkit_glue::WebPluginGeometry& geom);
+ void SetGeometry(const webkit::npapi::WebPluginGeometry& geom);
// Draws this accelerated surface's contents, texture mapped onto a quad in
// the given OpenGL context. TODO(kbr): figure out and define exactly how the
diff --git a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc
index 1ad09ba..a96782b 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc
+++ b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "chrome/browser/renderer_host/accelerated_surface_container_mac.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/webplugin.h"
AcceleratedSurfaceContainerManagerMac::AcceleratedSurfaceContainerManagerMac()
: current_id_(0),
@@ -86,7 +86,7 @@ void AcceleratedSurfaceContainerManagerMac::SetSizeAndTransportDIB(
}
void AcceleratedSurfaceContainerManagerMac::SetPluginContainerGeometry(
- const webkit_glue::WebPluginGeometry& move) {
+ const webkit::npapi::WebPluginGeometry& move) {
AutoLock lock(lock_);
AcceleratedSurfaceContainerMac* container = MapIDToContainer(move.window);
diff --git a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
index a03a5c4..a2855a4 100644
--- a/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
+++ b/chrome/browser/renderer_host/accelerated_surface_container_manager_mac.h
@@ -14,9 +14,11 @@
#include "base/lock.h"
#include "gfx/native_widget_types.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
struct WebPluginGeometry;
}
+}
class AcceleratedSurfaceContainerMac;
@@ -63,7 +65,8 @@ class AcceleratedSurfaceContainerManagerMac {
// Takes an update from WebKit about a plugin's position and size and moves
// the plugin accordingly.
- void SetPluginContainerGeometry(const webkit_glue::WebPluginGeometry& move);
+ void SetPluginContainerGeometry(
+ const webkit::npapi::WebPluginGeometry& move);
// Draws the plugin container associated with the given id into the given
// OpenGL context, which must already be current.
diff --git a/chrome/browser/renderer_host/buffered_resource_handler.cc b/chrome/browser/renderer_host/buffered_resource_handler.cc
index 82ca861..bc35c42 100644
--- a/chrome/browser/renderer_host/buffered_resource_handler.cc
+++ b/chrome/browser/renderer_host/buffered_resource_handler.cc
@@ -22,7 +22,7 @@
#include "net/base/mime_util.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
namespace {
@@ -422,18 +422,18 @@ bool BufferedResourceHandler::ShouldDownload(bool* need_plugin_list) {
return false;
if (need_plugin_list) {
- if (!NPAPI::PluginList::Singleton()->PluginsLoaded()) {
+ if (!webkit::npapi::PluginList::Singleton()->PluginsLoaded()) {
*need_plugin_list = true;
return true;
}
} else {
- DCHECK(NPAPI::PluginList::Singleton()->PluginsLoaded());
+ DCHECK(webkit::npapi::PluginList::Singleton()->PluginsLoaded());
}
// Finally, check the plugin list.
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
bool allow_wildcard = false;
- return !NPAPI::PluginList::Singleton()->GetPluginInfo(
+ return !webkit::npapi::PluginList::Singleton()->GetPluginInfo(
GURL(), type, allow_wildcard, &info, NULL) || !info.enabled;
}
@@ -469,8 +469,8 @@ void BufferedResourceHandler::UseAlternateResourceHandler(
}
void BufferedResourceHandler::LoadPlugins() {
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::npapi::PluginList::Singleton()->GetPlugins(false, &plugins);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
diff --git a/chrome/browser/renderer_host/render_message_filter.cc b/chrome/browser/renderer_host/render_message_filter.cc
index ad49440..453e5c5 100644
--- a/chrome/browser/renderer_host/render_message_filter.cc
+++ b/chrome/browser/renderer_host/render_message_filter.cc
@@ -65,11 +65,11 @@
#include "net/url_request/url_request_context.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h"
#include "webkit/glue/context_menu.h"
-#include "webkit/glue/plugins/plugin_group.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webcookie.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/plugins/npapi/plugin_group.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugin.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/plugin_selection_policy.h"
@@ -200,7 +200,7 @@ class OpenChannelToPluginCallback : public PluginProcessHost::Client {
return filter_->off_the_record();
}
- virtual void SetPluginInfo(const WebPluginInfo& info) {
+ virtual void SetPluginInfo(const webkit::npapi::WebPluginInfo& info) {
info_ = info;
}
@@ -223,7 +223,7 @@ class OpenChannelToPluginCallback : public PluginProcessHost::Client {
scoped_refptr<RenderMessageFilter> filter_;
IPC::Message* reply_msg_;
- WebPluginInfo info_;
+ webkit::npapi::WebPluginInfo info_;
};
} // namespace
@@ -684,8 +684,8 @@ void RenderMessageFilter::OnGetPlugins(bool refresh,
void RenderMessageFilter::OnGetPluginsOnFileThread(
bool refresh, IPC::Message* reply_msg) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetEnabledPlugins(refresh, &plugins);
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
+ webkit::npapi::PluginList::Singleton()->GetEnabledPlugins(refresh, &plugins);
ViewHostMsg_GetPlugins::WriteReplyParams(reply_msg, plugins);
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
@@ -711,7 +711,7 @@ void RenderMessageFilter::OnGetPluginInfoOnFileThread(
const std::string& mime_type,
IPC::Message* reply_msg) {
std::string actual_mime_type;
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
bool found = plugin_service_->GetFirstAllowedPluginInfo(url,
mime_type,
&info,
@@ -723,18 +723,20 @@ void RenderMessageFilter::OnGetPluginInfoOnFileThread(
found, info, actual_mime_type, policy_url, reply_msg));
}
-void RenderMessageFilter::OnGotPluginInfo(bool found,
- const WebPluginInfo& info,
- const std::string& actual_mime_type,
- const GURL& policy_url,
- IPC::Message* reply_msg) {
+void RenderMessageFilter::OnGotPluginInfo(
+ bool found,
+ const webkit::npapi::WebPluginInfo& info,
+ const std::string& actual_mime_type,
+ const GURL& policy_url,
+ IPC::Message* reply_msg) {
ContentSetting setting = CONTENT_SETTING_DEFAULT;
- WebPluginInfo info_copy = info;
+ webkit::npapi::WebPluginInfo info_copy = info;
if (found) {
info_copy.enabled = info_copy.enabled &&
plugin_service_->PrivatePluginAllowedForURL(info_copy.path, policy_url);
std::string resource =
- NPAPI::PluginList::Singleton()->GetPluginGroupIdentifier(info_copy);
+ webkit::npapi::PluginList::Singleton()->GetPluginGroupIdentifier(
+ info_copy);
setting = content_settings_->GetContentSetting(
policy_url,
CONTENT_SETTINGS_TYPE_PLUGINS,
diff --git a/chrome/browser/renderer_host/render_message_filter.h b/chrome/browser/renderer_host/render_message_filter.h
index 9a8a745..5c988b8 100644
--- a/chrome/browser/renderer_host/render_message_filter.h
+++ b/chrome/browser/renderer_host/render_message_filter.h
@@ -41,7 +41,12 @@ class RenderWidgetHelper;
class URLRequestContextGetter;
struct ViewHostMsg_CreateWindow_Params;
struct ViewHostMsg_CreateWorker_Params;
+
+namespace webkit {
+namespace npapi {
struct WebPluginInfo;
+}
+}
namespace base {
class SharedMemory;
@@ -153,7 +158,7 @@ class RenderMessageFilter : public BrowserMessageFilter,
const std::string& mime_type,
IPC::Message* reply_msg);
void OnGotPluginInfo(bool found,
- const WebPluginInfo& info,
+ const webkit::npapi::WebPluginInfo& info,
const std::string& actual_mime_type,
const GURL& policy_url,
IPC::Message* reply_msg);
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc
index 3c71440b..b4bb0e2 100644
--- a/chrome/browser/renderer_host/render_widget_host.cc
+++ b/chrome/browser/renderer_host/render_widget_host.cc
@@ -22,8 +22,8 @@
#include "chrome/common/render_messages.h"
#include "chrome/common/render_messages_params.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webcursor.h"
+#include "webkit/plugins/npapi/webplugin.h"
#if defined(TOOLKIT_VIEWS)
#include "views/view.h"
diff --git a/chrome/browser/renderer_host/render_widget_host_view.h b/chrome/browser/renderer_host/render_widget_host_view.h
index fdbe440..2d4b1ea 100644
--- a/chrome/browser/renderer_host/render_widget_host_view.h
+++ b/chrome/browser/renderer_host/render_widget_host_view.h
@@ -39,8 +39,13 @@ struct ViewHostMsg_AccessibilityNotification_Params;
namespace webkit_glue {
struct WebAccessibility;
+}
+
+namespace webkit {
+namespace npapi {
struct WebPluginGeometry;
}
+}
// RenderWidgetHostView is an interface implemented by an object that acts as
// the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its
@@ -97,7 +102,7 @@ class RenderWidgetHostView {
// Moves all plugin windows as described in the given list.
virtual void MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves) = 0;
+ const std::vector<webkit::npapi::WebPluginGeometry>& moves) = 0;
// Actually set/take focus to/from the associated View component.
virtual void Focus() = 0;
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
index e90e096..b091890ef 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc
@@ -38,9 +38,9 @@
#include "chrome/common/native_web_keyboard_event.h"
#include "gfx/gtk_preserve_window.h"
#include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webcursor_gtk_data.h"
+#include "webkit/plugins/npapi/webplugin.h"
#if defined(OS_CHROMEOS)
#include "views/widget/tooltip_window_gtk.h"
@@ -587,7 +587,7 @@ gfx::NativeView RenderWidgetHostViewGtk::GetNativeView() {
}
void RenderWidgetHostViewGtk::MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves) {
+ const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
for (size_t i = 0; i < moves.size(); ++i) {
plugin_container_manager_.MovePluginContainer(moves[i]);
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.h b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
index 9f9b2e2..2c47c01 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_gtk.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.h
@@ -19,8 +19,8 @@
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "gfx/native_widget_types.h"
#include "gfx/rect.h"
-#include "webkit/glue/plugins/gtk_plugin_container_manager.h"
#include "webkit/glue/webcursor.h"
+#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
class RenderWidgetHost;
class GtkIMContextWrapper;
@@ -61,7 +61,7 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView,
virtual void SetSize(const gfx::Size& size);
virtual gfx::NativeView GetNativeView();
virtual void MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves);
+ const std::vector<webkit::npapi::WebPluginGeometry>& moves);
virtual void Focus();
virtual void Blur();
virtual bool HasFocus();
@@ -208,7 +208,7 @@ class RenderWidgetHostViewGtk : public RenderWidgetHostView,
scoped_ptr<GtkKeyBindingsHandler> key_bindings_handler_;
// Helper class that lets us allocate plugin containers and move them.
- GtkPluginContainerManager plugin_container_manager_;
+ webkit::npapi::GtkPluginContainerManager plugin_container_manager_;
// The size that we want the renderer to be. We keep this in a separate
// variable because resizing in GTK+ is async.
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.h b/chrome/browser/renderer_host/render_widget_host_view_mac.h
index 46efeee..d538758 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.h
@@ -184,7 +184,7 @@ class RenderWidgetHostViewMac : public RenderWidgetHostView {
virtual void SetSize(const gfx::Size& size);
virtual gfx::NativeView GetNativeView();
virtual void MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves);
+ const std::vector<webkit::npapi::WebPluginGeometry>& moves);
virtual void Focus();
virtual void Blur();
virtual bool HasFocus();
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
index 22175dc..60cc85e 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm
@@ -40,8 +40,8 @@
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/WebKit/WebKit/chromium/public/mac/WebInputEventFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webaccessibility.h"
+#include "webkit/plugins/npapi/webplugin.h"
#import "third_party/mozilla/ComplexTextInputPanel.h"
using WebKit::WebInputEvent;
@@ -623,15 +623,15 @@ gfx::NativeView RenderWidgetHostViewMac::GetNativeView() {
}
void RenderWidgetHostViewMac::MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves) {
+ const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
// Handle movement of accelerated plugins, which are the only "windowed"
// plugins that exist on the Mac.
- for (std::vector<webkit_glue::WebPluginGeometry>::const_iterator iter =
+ for (std::vector<webkit::npapi::WebPluginGeometry>::const_iterator iter =
moves.begin();
iter != moves.end();
++iter) {
- webkit_glue::WebPluginGeometry geom = *iter;
+ webkit::npapi::WebPluginGeometry geom = *iter;
AcceleratedPluginView* view = ViewForPluginWindowHandle(geom.window);
DCHECK(view);
@@ -978,14 +978,14 @@ void RenderWidgetHostViewMac::AcceleratedSurfaceSetIOSurface(
// Fake up a WebPluginGeometry for the root window to set the
// container's size; we will never get a notification from the
// browser about the root window, only plugins.
- webkit_glue::WebPluginGeometry geom;
+ webkit::npapi::WebPluginGeometry geom;
gfx::Rect rect(0, 0, width, height);
geom.window = window;
geom.window_rect = rect;
geom.clip_rect = rect;
geom.visible = true;
geom.rects_valid = true;
- MovePluginWindows(std::vector<webkit_glue::WebPluginGeometry>(1, geom));
+ MovePluginWindows(std::vector<webkit::npapi::WebPluginGeometry>(1, geom));
}
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index 521e48d..a36c88f 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/chrome/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -57,7 +57,7 @@ class RenderWidgetHostViewMacTest : public RenderViewHostTestHarness {
// The accelerated view isn't shown until it has a valid rect and has been
// painted to.
rwhv_mac_->AcceleratedSurfaceBuffersSwapped(accelerated_handle, 0, 0, 0, 0);
- webkit_glue::WebPluginGeometry geom;
+ webkit::npapi::WebPluginGeometry geom;
gfx::Rect rect(0, 0, w, h);
geom.window = accelerated_handle;
geom.window_rect = rect;
@@ -65,7 +65,7 @@ class RenderWidgetHostViewMacTest : public RenderViewHostTestHarness {
geom.visible = true;
geom.rects_valid = true;
rwhv_mac_->MovePluginWindows(
- std::vector<webkit_glue::WebPluginGeometry>(1, geom));
+ std::vector<webkit::npapi::WebPluginGeometry>(1, geom));
return accelerated_handle;
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.cc b/chrome/browser/renderer_host/render_widget_host_view_views.cc
index cb17689..c48a1a9 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.cc
@@ -193,7 +193,7 @@ void RenderWidgetHostViewViews::SetSize(const gfx::Size& size) {
}
void RenderWidgetHostViewViews::MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves) {
+ const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
// TODO(anicolao): NIY
// NOTIMPLEMENTED();
}
diff --git a/chrome/browser/renderer_host/render_widget_host_view_views.h b/chrome/browser/renderer_host/render_widget_host_view_views.h
index 9c5c8cb..8a582a7 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_views.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_views.h
@@ -44,7 +44,7 @@ class RenderWidgetHostViewViews : public RenderWidgetHostView,
virtual void WasHidden();
virtual void SetSize(const gfx::Size& size);
virtual void MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves);
+ const std::vector<webkit::npapi::WebPluginGeometry>& moves);
virtual void Focus();
virtual void Blur();
virtual bool HasFocus();
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc
index f5afe70..6a86bc0 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.cc
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc
@@ -46,11 +46,11 @@
#include "views/focus/focus_util_win.h"
// Included for views::kReflectedMessage - TODO(beng): move this to win_util.h!
#include "views/widget/widget_win.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webcursor.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin.h"
using app::ViewProp;
using base::TimeDelta;
@@ -59,7 +59,7 @@ using WebKit::WebInputEvent;
using WebKit::WebInputEventFactory;
using WebKit::WebMouseEvent;
using WebKit::WebTextDirection;
-using webkit_glue::WebPluginGeometry;
+using webkit::npapi::WebPluginGeometry;
const wchar_t kRenderWidgetHostHWNDClass[] = L"Chrome_RenderWidgetHostHWND";
@@ -236,7 +236,7 @@ class NotifyPluginProcessHostTask : public Task {
// Windows callback for OnDestroy to detach the plugin windows.
BOOL CALLBACK DetachPluginWindowsCallback(HWND window, LPARAM param) {
- if (WebPluginDelegateImpl::IsPluginDelegateWindow(window) &&
+ if (webkit::npapi::WebPluginDelegateImpl::IsPluginDelegateWindow(window) &&
!IsHungAppWindow(window)) {
::ShowWindow(window, SW_HIDE);
SetParent(window, NULL);
@@ -490,7 +490,7 @@ HWND RenderWidgetHostViewWin::ReparentWindow(HWND window) {
wcex.hCursor = 0;
wcex.hbrBackground = reinterpret_cast<HBRUSH>(COLOR_WINDOW+1);
wcex.lpszMenuName = 0;
- wcex.lpszClassName = kWrapperNativeWindowClassName;
+ wcex.lpszClassName = webkit::npapi::kWrapperNativeWindowClassName;
wcex.hIconSm = 0;
window_class = RegisterClassEx(&wcex);
}
@@ -654,11 +654,11 @@ void RenderWidgetHostViewWin::ImeCancelComposition() {
}
BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lparam) {
- if (!WebPluginDelegateImpl::IsPluginDelegateWindow(hwnd))
+ if (!webkit::npapi::WebPluginDelegateImpl::IsPluginDelegateWindow(hwnd))
return TRUE;
gfx::Rect* rect = reinterpret_cast<gfx::Rect*>(lparam);
- static UINT msg = RegisterWindowMessage(kPaintMessageName);
+ static UINT msg = RegisterWindowMessage(webkit::npapi::kPaintMessageName);
WPARAM wparam = rect->x() << 16 | rect->y();
lparam = rect->width() << 16 | rect->height();
@@ -1447,7 +1447,8 @@ LRESULT RenderWidgetHostViewWin::OnMouseActivate(UINT message,
::ScreenToClient(m_hWnd, &cursor_pos);
HWND child_window = ::RealChildWindowFromPoint(m_hWnd, cursor_pos);
if (::IsWindow(child_window) && child_window != m_hWnd) {
- if (win_util::GetClassName(child_window) == kWrapperNativeWindowClassName)
+ if (win_util::GetClassName(child_window) ==
+ webkit::npapi::kWrapperNativeWindowClassName)
child_window = ::GetWindow(child_window, GW_CHILD);
::SetFocus(child_window);
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.h b/chrome/browser/renderer_host/render_widget_host_view_win.h
index 1f67814..50e59a6 100644
--- a/chrome/browser/renderer_host/render_widget_host_view_win.h
+++ b/chrome/browser/renderer_host/render_widget_host_view_win.h
@@ -132,7 +132,7 @@ class RenderWidgetHostViewWin
virtual void SetSize(const gfx::Size& size);
virtual gfx::NativeView GetNativeView();
virtual void MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves);
+ const std::vector<webkit::npapi::WebPluginGeometry>& moves);
virtual void Focus();
virtual void Blur();
virtual bool HasFocus();
diff --git a/chrome/browser/renderer_host/test/test_render_view_host.h b/chrome/browser/renderer_host/test/test_render_view_host.h
index 7aa9638..f84bc21 100644
--- a/chrome/browser/renderer_host/test/test_render_view_host.h
+++ b/chrome/browser/renderer_host/test/test_render_view_host.h
@@ -60,7 +60,7 @@ class TestRenderWidgetHostView : public RenderWidgetHostView {
virtual void SetSize(const gfx::Size& size) {}
virtual gfx::NativeView GetNativeView() { return NULL; }
virtual void MovePluginWindows(
- const std::vector<webkit_glue::WebPluginGeometry>& moves) {}
+ const std::vector<webkit::npapi::WebPluginGeometry>& moves) {}
#if defined(OS_WIN)
virtual void ForwardMouseEventToRenderer(UINT message,
WPARAM wparam,
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index 46498e3..8f5ed48 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -113,7 +113,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/password_form.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
// Cross-Site Navigations
//
@@ -2091,8 +2091,8 @@ void TabContents::OnCrashedPlugin(const FilePath& plugin_path) {
DCHECK(!plugin_path.value().empty());
std::wstring plugin_name = plugin_path.ToWStringHack();
- WebPluginInfo plugin_info;
- if (NPAPI::PluginList::Singleton()->GetPluginInfoByPath(
+ webkit::npapi::WebPluginInfo plugin_info;
+ if (webkit::npapi::PluginList::Singleton()->GetPluginInfoByPath(
plugin_path, &plugin_info) &&
!plugin_info.name.empty()) {
plugin_name = UTF16ToWide(plugin_info.name);
diff --git a/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm b/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm
index 051d58b..746d8a1 100644
--- a/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/table_model_array_controller_unittest.mm
@@ -15,8 +15,8 @@
#include "grit/generated_resources.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/gtest_mac.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
class TableModelArrayControllerTest : public CocoaTest {
public:
@@ -50,27 +50,27 @@ class TableModelArrayControllerTest : public CocoaTest {
model_.reset(new MockPluginExceptionsTableModel(map, NULL));
- std::vector<PluginGroup> plugins;
- WebPluginInfo foo_plugin;
+ std::vector<webkit::npapi::PluginGroup> plugins;
+ webkit::npapi::WebPluginInfo foo_plugin;
foo_plugin.path = FilePath(FILE_PATH_LITERAL("a-foo"));
foo_plugin.name = ASCIIToUTF16("FooPlugin");
foo_plugin.enabled = true;
- scoped_ptr<PluginGroup> foo_group(
- PluginGroup::FromWebPluginInfo(foo_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> foo_group(
+ webkit::npapi::PluginGroup::FromWebPluginInfo(foo_plugin));
plugins.push_back(*foo_group);
- WebPluginInfo bar_plugin;
+ webkit::npapi::WebPluginInfo bar_plugin;
bar_plugin.path = FilePath(FILE_PATH_LITERAL("b-bar"));
bar_plugin.name = ASCIIToUTF16("BarPlugin");
bar_plugin.enabled = true;
- scoped_ptr<PluginGroup> bar_group(
- PluginGroup::FromWebPluginInfo(bar_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> bar_group(
+ webkit::npapi::PluginGroup::FromWebPluginInfo(bar_plugin));
plugins.push_back(*bar_group);
- WebPluginInfo blurp_plugin;
+ webkit::npapi::WebPluginInfo blurp_plugin;
blurp_plugin.path = FilePath(FILE_PATH_LITERAL("c-blurp"));
blurp_plugin.name = ASCIIToUTF16("BlurpPlugin");
blurp_plugin.enabled = true;
- scoped_ptr<PluginGroup> blurp_group(
- PluginGroup::FromWebPluginInfo(blurp_plugin));
+ scoped_ptr<webkit::npapi::PluginGroup> blurp_group(
+ webkit::npapi::PluginGroup::FromWebPluginInfo(blurp_plugin));
plugins.push_back(*blurp_group);
model_->set_plugins(plugins);
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:
//
diff --git a/chrome/default_plugin/DEPS b/chrome/default_plugin/DEPS
index 6e518f99..0ba7c46 100644
--- a/chrome/default_plugin/DEPS
+++ b/chrome/default_plugin/DEPS
@@ -3,4 +3,5 @@ include_rules = [
"+grit", # For generated headers
"+libxml",
"+webkit/glue",
+ "+webkit/plugins",
]
diff --git a/chrome/default_plugin/plugin_impl_gtk.cc b/chrome/default_plugin/plugin_impl_gtk.cc
index ae7dfb2..b6dc38a 100644
--- a/chrome/default_plugin/plugin_impl_gtk.cc
+++ b/chrome/default_plugin/plugin_impl_gtk.cc
@@ -14,7 +14,7 @@
#include "grit/webkit_strings.h"
#include "unicode/locid.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/default_plugin_shared.h"
+#include "webkit/plugins/npapi/default_plugin_shared.h"
// TODO(thakis): Most methods in this class are stubbed out an need to be
// implemented.
@@ -137,6 +137,6 @@ void PluginInstallerImpl::NotifyPluginStatus(int status) {
default_plugin::g_browser->getvalue(
instance_,
static_cast<NPNVariable>(
- default_plugin::kMissingPluginStatusStart + status),
+ webkit::npapi::default_plugin::kMissingPluginStatusStart + status),
NULL);
}
diff --git a/chrome/default_plugin/plugin_impl_mac.mm b/chrome/default_plugin/plugin_impl_mac.mm
index 0bad41b..f964023 100644
--- a/chrome/default_plugin/plugin_impl_mac.mm
+++ b/chrome/default_plugin/plugin_impl_mac.mm
@@ -17,7 +17,7 @@
#include "grit/webkit_strings.h"
#include "unicode/locid.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/default_plugin_shared.h"
+#include "webkit/plugins/npapi/default_plugin_shared.h"
// TODO(thakis): Most methods in this class are stubbed out and need to be
// implemented.
@@ -194,6 +194,6 @@ void PluginInstallerImpl::NotifyPluginStatus(int status) {
default_plugin::g_browser->getvalue(
instance_,
static_cast<NPNVariable>(
- default_plugin::kMissingPluginStatusStart + status),
+ webkit::npapi::default_plugin::kMissingPluginStatusStart + status),
NULL);
}
diff --git a/chrome/default_plugin/plugin_impl_win.cc b/chrome/default_plugin/plugin_impl_win.cc
index e9346c6..cb767b0 100644
--- a/chrome/default_plugin/plugin_impl_win.cc
+++ b/chrome/default_plugin/plugin_impl_win.cc
@@ -15,7 +15,7 @@
#include "grit/webkit_strings.h"
#include "unicode/locid.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/default_plugin_shared.h"
+#include "webkit/plugins/npapi/default_plugin_shared.h"
static const int TOOLTIP_MAX_WIDTH = 500;
@@ -250,7 +250,8 @@ void PluginInstallerImpl::URLNotify(const char* url, NPReason reason) {
if (plugin_available) {
DVLOG(1) << "Plugin available for mime type " << mime_type_;
DisplayAvailablePluginStatus();
- NotifyPluginStatus(default_plugin::MISSING_PLUGIN_AVAILABLE);
+ NotifyPluginStatus(
+ webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE);
} else {
DLOG(WARNING) << "No plugin available for mime type " << mime_type_;
DisplayStatus(IDS_DEFAULT_PLUGIN_NO_PLUGIN_AVAILABLE_MSG);
@@ -260,7 +261,8 @@ void PluginInstallerImpl::URLNotify(const char* url, NPReason reason) {
int16 PluginInstallerImpl::NPP_HandleEvent(void* event) {
NPEvent* npp_event = static_cast<NPEvent*>(event);
- if (npp_event->event == default_plugin::kInstallMissingPluginMessage) {
+ if (npp_event->event ==
+ webkit::npapi::default_plugin::kInstallMissingPluginMessage) {
// We could get this message because InfoBar may not be in sync with our
// internal processing. So we need to check the status.
if (plugin_installer_state() == PluginListDownloaded) {
@@ -527,7 +529,8 @@ LRESULT PluginInstallerImpl::OnLButtonDown(UINT message, WPARAM wparam,
return 0;
if (plugin_installer_state() == PluginListDownloaded) {
ShowInstallDialog();
- NotifyPluginStatus(default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD);
+ NotifyPluginStatus(
+ webkit::npapi::default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD);
} else if (plugin_installer_state_ == PluginInstallerLaunchSuccess) {
DCHECK(default_plugin::g_browser);
DCHECK(default_plugin::g_browser->geturl);
@@ -642,6 +645,6 @@ void PluginInstallerImpl::NotifyPluginStatus(int status) {
default_plugin::g_browser->getvalue(
instance_,
static_cast<NPNVariable>(
- default_plugin::kMissingPluginStatusStart + status),
+ webkit::npapi::default_plugin::kMissingPluginStatusStart + status),
NULL);
}
diff --git a/chrome/plugin/DEPS b/chrome/plugin/DEPS
index 3517180..15434bf 100644
--- a/chrome/plugin/DEPS
+++ b/chrome/plugin/DEPS
@@ -5,7 +5,7 @@ include_rules = [
"+skia/ext",
"+third_party/npapi",
"+webkit/glue",
- "+webkit/glue/plugins",
+ "+webkit/plugins",
"+grit", # For generated headers
]
diff --git a/chrome/plugin/chrome_plugin_host.cc b/chrome/plugin/chrome_plugin_host.cc
index 22b3da9..8458e25 100644
--- a/chrome/plugin/chrome_plugin_host.cc
+++ b/chrome/plugin/chrome_plugin_host.cc
@@ -25,7 +25,7 @@
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
#include "webkit/appcache/appcache_interfaces.h"
-#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
#include "webkit/glue/resource_loader_bridge.h"
#include "webkit/glue/resource_type.h"
#include "webkit/glue/webkit_glue.h"
@@ -415,8 +415,8 @@ CPBrowsingContext STDCALL CPB_GetBrowsingContextFromNPP(NPP npp) {
if (!npp)
return CPERR_INVALID_PARAMETER;
- NPAPI::PluginInstance* instance =
- static_cast<NPAPI::PluginInstance *>(npp->ndata);
+ webkit::npapi::PluginInstance* instance =
+ static_cast<webkit::npapi::PluginInstance *>(npp->ndata);
WebPluginProxy* webplugin =
static_cast<WebPluginProxy*>(instance->webplugin());
diff --git a/chrome/plugin/npobject_proxy.cc b/chrome/plugin/npobject_proxy.cc
index f245151..0b7ff45 100644
--- a/chrome/plugin/npobject_proxy.cc
+++ b/chrome/plugin/npobject_proxy.cc
@@ -9,7 +9,7 @@
#include "chrome/plugin/plugin_channel.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
using WebKit::WebBindings;
@@ -460,8 +460,8 @@ bool NPObjectProxy::NPNEvaluate(NPP npp,
bool popups_allowed = false;
if (npp) {
- NPAPI::PluginInstance* plugin_instance =
- reinterpret_cast<NPAPI::PluginInstance*>(npp->ndata);
+ webkit::npapi::PluginInstance* plugin_instance =
+ reinterpret_cast<webkit::npapi::PluginInstance*>(npp->ndata);
if (plugin_instance)
popups_allowed = plugin_instance->popups_allowed();
}
diff --git a/chrome/plugin/npobject_stub.cc b/chrome/plugin/npobject_stub.cc
index c711756..e0a8436 100644
--- a/chrome/plugin/npobject_stub.cc
+++ b/chrome/plugin/npobject_stub.cc
@@ -12,7 +12,7 @@
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/npruntime.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
using WebKit::WebBindings;
@@ -243,7 +243,7 @@ void NPObjectStub::OnSetProperty(const NPIdentifier_Param& name,
PluginThread::current()->plugin_path().BaseName().value());
static NPIdentifier fullscreen =
WebBindings::getStringIdentifier("fullScreen");
- if (filename == kNewWMPPlugin && id == fullscreen) {
+ if (filename == webkit::npapi::kNewWMPPlugin && id == fullscreen) {
// Workaround for bug 15985, which is if Flash causes WMP to go
// full screen a deadlock can occur when WMP calls SetFocus.
NPObjectMsg_SetProperty::WriteReplyParams(reply_msg, true);
diff --git a/chrome/plugin/npobject_util.cc b/chrome/plugin/npobject_util.cc
index 0c54a33..60324cf 100644
--- a/chrome/plugin/npobject_util.cc
+++ b/chrome/plugin/npobject_util.cc
@@ -10,7 +10,7 @@
#include "chrome/plugin/plugin_channel_base.h"
#include "third_party/npapi/bindings/nphostapi.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
-#include "webkit/glue/plugins/plugin_host.h"
+#include "webkit/plugins/npapi/plugin_host.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebBindings;
@@ -129,7 +129,7 @@ NPNetscapeFuncs *GetHostFunctions() {
void PatchNPNFunctions() {
g_plugin_process = true;
NPNetscapeFuncs* funcs = GetHostFunctions();
- NPAPI::PluginHost::Singleton()->PatchNPNetscapeFuncs(funcs);
+ webkit::npapi::PluginHost::Singleton()->PatchNPNetscapeFuncs(funcs);
}
bool IsPluginProcess() {
diff --git a/chrome/plugin/plugin_channel.cc b/chrome/plugin/plugin_channel.cc
index b3b12951..bc5e61e 100644
--- a/chrome/plugin/plugin_channel.cc
+++ b/chrome/plugin/plugin_channel.cc
@@ -16,7 +16,7 @@
#include "chrome/plugin/plugin_thread.h"
#include "chrome/plugin/webplugin_delegate_stub.h"
#include "chrome/plugin/webplugin_proxy.h"
-#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
#if defined(OS_POSIX)
#include "base/eintr_wrapper.h"
@@ -256,12 +256,12 @@ void PluginChannel::OnClearSiteData(uint64 flags,
bool success = false;
CommandLine* command_line = CommandLine::ForCurrentProcess();
FilePath path = command_line->GetSwitchValuePath(switches::kPluginPath);
- scoped_refptr<NPAPI::PluginLib> plugin_lib(
- NPAPI::PluginLib::CreatePluginLib(path));
+ scoped_refptr<webkit::npapi::PluginLib> plugin_lib(
+ webkit::npapi::PluginLib::CreatePluginLib(path));
if (plugin_lib.get()) {
NPError err = plugin_lib->NP_Initialize();
if (err == NPERR_NO_ERROR) {
- scoped_refptr<NPAPI::PluginInstance> instance(
+ scoped_refptr<webkit::npapi::PluginInstance> instance(
plugin_lib->CreateInstance(std::string()));
const char* domain_str = domain.empty() ? NULL : domain.c_str();
diff --git a/chrome/plugin/plugin_interpose_util_mac.mm b/chrome/plugin/plugin_interpose_util_mac.mm
index 45df449..7299d4b 100644
--- a/chrome/plugin/plugin_interpose_util_mac.mm
+++ b/chrome/plugin/plugin_interpose_util_mac.mm
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -9,7 +9,7 @@
#include "chrome/common/plugin_messages.h"
#include "chrome/plugin/plugin_thread.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
namespace mac_plugin_interposing {
@@ -32,7 +32,7 @@ void SwitchToPluginProcess() {
__attribute__((visibility("default")))
OpaquePluginRef GetActiveDelegate() {
- return WebPluginDelegateImpl::GetActiveDelegate();
+ return webkit::npapi::WebPluginDelegateImpl::GetActiveDelegate();
}
__attribute__((visibility("default")))
@@ -72,13 +72,15 @@ void NotifyBrowserOfPluginHideWindow(uint32 window_id, CGRect bounds) {
__attribute__((visibility("default")))
void NotifyPluginOfSetThemeCursor(OpaquePluginRef delegate,
ThemeCursor cursor) {
- static_cast<WebPluginDelegateImpl*>(delegate)->SetThemeCursor(cursor);
+ static_cast<webkit::npapi::WebPluginDelegateImpl*>(delegate)->SetThemeCursor(
+ cursor);
}
__attribute__((visibility("default")))
void NotifyPluginOfSetCursor(OpaquePluginRef delegate,
const Cursor* cursor) {
- static_cast<WebPluginDelegateImpl*>(delegate)->SetCursor(cursor);
+ static_cast<webkit::npapi::WebPluginDelegateImpl*>(delegate)->SetCursor(
+ cursor);
}
void NotifyPluginOfSetCursorVisibility(bool visibility) {
@@ -91,7 +93,8 @@ void NotifyPluginOfSetCursorVisibility(bool visibility) {
__attribute__((visibility("default")))
bool GetPluginWindowHasFocus(const OpaquePluginRef delegate) {
- return static_cast<WebPluginDelegateImpl*>(delegate)->GetWindowHasFocus();
+ return static_cast<webkit::npapi::WebPluginDelegateImpl*>(
+ delegate)->GetWindowHasFocus();
}
} // namespace mac_plugin_interposing
@@ -237,7 +240,8 @@ static void OnPluginWindowShown(const WindowInfo& window_info, BOOL is_modal) {
- (void)chromePlugin_set {
OpaquePluginRef delegate = mac_plugin_interposing::GetActiveDelegate();
if (delegate) {
- static_cast<WebPluginDelegateImpl*>(delegate)->SetNSCursor(self);
+ static_cast<webkit::npapi::WebPluginDelegateImpl*>(delegate)->SetNSCursor(
+ self);
return;
}
[self chromePlugin_set];
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index 7e2b921..8edcbbd 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -29,9 +29,9 @@
#include "chrome/renderer/render_thread.h"
#include "ipc/ipc_channel_handle.h"
#include "net/base/net_errors.h"
-#include "webkit/glue/plugins/plugin_lib.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#if defined(TOOLKIT_USES_GTK)
#include "gfx/gtk_util.h"
@@ -86,8 +86,8 @@ PluginThread::PluginThread()
ChromePluginLib::Create(plugin_path_, GetCPBrowserFuncsForPlugin());
- scoped_refptr<NPAPI::PluginLib> plugin(
- NPAPI::PluginLib::CreatePluginLib(plugin_path_));
+ scoped_refptr<webkit::npapi::PluginLib> plugin(
+ webkit::npapi::PluginLib::CreatePluginLib(plugin_path_));
if (plugin.get()) {
plugin->NP_Initialize();
@@ -115,7 +115,7 @@ PluginThread::~PluginThread() {
preloaded_plugin_module_ = NULL;
}
PluginChannelBase::CleanupChannels();
- NPAPI::PluginLib::UnloadAllPlugins();
+ webkit::npapi::PluginLib::UnloadAllPlugins();
ChromePluginLib::UnloadAllPlugins();
if (webkit_glue::ShouldForcefullyTerminatePluginProcess())
diff --git a/chrome/plugin/plugin_thread.h b/chrome/plugin/plugin_thread.h
index 99d07ed..4d24e3c 100644
--- a/chrome/plugin/plugin_thread.h
+++ b/chrome/plugin/plugin_thread.h
@@ -11,7 +11,7 @@
#include "build/build_config.h"
#include "chrome/common/child_thread.h"
#include "chrome/plugin/plugin_channel.h"
-#include "webkit/glue/plugins/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
#if defined(OS_POSIX)
#include "base/file_descriptor_posix.h"
diff --git a/chrome/plugin/webplugin_accelerated_surface_proxy_mac.h b/chrome/plugin/webplugin_accelerated_surface_proxy_mac.h
index 8764ab9..ee4df63 100644
--- a/chrome/plugin/webplugin_accelerated_surface_proxy_mac.h
+++ b/chrome/plugin/webplugin_accelerated_surface_proxy_mac.h
@@ -6,7 +6,7 @@
#define CHROME_PLUGIN_WEBPLUGIN_ACCELERATED_SURFACE_PROXY_H_
#pragma once
-#include "webkit/glue/plugins/webplugin_accelerated_surface_mac.h"
+#include "webkit/plugins/npapi/webplugin_accelerated_surface_mac.h"
class WebPluginProxy;
class AcceleratedSurface;
@@ -14,7 +14,7 @@ class AcceleratedSurface;
// Out-of-process implementation of WebPluginAcceleratedSurface that proxies
// calls through a WebPluginProxy.
class WebPluginAcceleratedSurfaceProxy
- : public webkit_glue::WebPluginAcceleratedSurface {
+ : public webkit::npapi::WebPluginAcceleratedSurface {
public:
// Creates a new WebPluginAcceleratedSurfaceProxy that uses plugin_proxy
// to proxy calls. plugin_proxy must outlive this object.
diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc
index ff0652d..0540adf 100644
--- a/chrome/plugin/webplugin_delegate_stub.cc
+++ b/chrome/plugin/webplugin_delegate_stub.cc
@@ -20,7 +20,7 @@
#include "skia/ext/platform_device.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include "webkit/glue/webcursor.h"
#if defined(ENABLE_GPU)
@@ -29,13 +29,15 @@
using WebKit::WebBindings;
using WebKit::WebCursorInfo;
-using webkit_glue::WebPlugin;
-using webkit_glue::WebPluginResourceClient;
+using webkit::npapi::WebPlugin;
+using webkit::npapi::WebPluginResourceClient;
class FinishDestructionTask : public Task {
public:
- FinishDestructionTask(WebPluginDelegateImpl* delegate, WebPlugin* webplugin)
- : delegate_(delegate), webplugin_(webplugin) { }
+ FinishDestructionTask(webkit::npapi::WebPluginDelegateImpl* delegate,
+ WebPlugin* webplugin)
+ : delegate_(delegate), webplugin_(webplugin) {
+ }
void Run() {
// WebPlugin must outlive WebPluginDelegate.
@@ -46,8 +48,8 @@ class FinishDestructionTask : public Task {
}
private:
- WebPluginDelegateImpl* delegate_;
- WebPlugin* webplugin_;
+ webkit::npapi::WebPluginDelegateImpl* delegate_;
+ webkit::npapi::WebPlugin* webplugin_;
};
WebPluginDelegateStub::WebPluginDelegateStub(
@@ -185,7 +187,8 @@ void WebPluginDelegateStub::OnInit(const PluginMsg_Init_Params& params,
webplugin_ = new WebPluginProxy(
channel_, instance_id_, page_url_, params.containing_window,
params.host_render_view_routing_id);
- delegate_ = WebPluginDelegateImpl::Create(path, mime_type_, parent);
+ delegate_ = webkit::npapi::WebPluginDelegateImpl::Create(
+ path, mime_type_, parent);
if (delegate_) {
webplugin_->set_delegate(delegate_);
*result = delegate_->Initialize(params.url,
diff --git a/chrome/plugin/webplugin_delegate_stub.h b/chrome/plugin/webplugin_delegate_stub.h
index cbd2c97..c310467 100644
--- a/chrome/plugin/webplugin_delegate_stub.h
+++ b/chrome/plugin/webplugin_delegate_stub.h
@@ -29,7 +29,11 @@ namespace WebKit {
class WebInputEvent;
}
+namespace webkit {
+namespace npapi {
class WebPluginDelegateImpl;
+}
+}
// Converts the IPC messages from WebPluginDelegateProxy into calls to the
// actual WebPluginDelegateImpl object.
@@ -111,7 +115,7 @@ class WebPluginDelegateStub : public IPC::Channel::Listener,
scoped_refptr<PluginChannel> channel_;
- WebPluginDelegateImpl* delegate_;
+ webkit::npapi::WebPluginDelegateImpl* delegate_;
WebPluginProxy* webplugin_;
bool in_destructor_;
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
index bb77108..498df98 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -34,16 +34,17 @@
#endif
#include "skia/ext/platform_device.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#if defined(USE_X11)
#include "app/x11_util_internal.h"
#endif
using WebKit::WebBindings;
-using webkit_glue::WebPluginResourceClient;
+
+using webkit::npapi::WebPluginResourceClient;
#if defined(OS_MACOSX)
-using webkit_glue::WebPluginAcceleratedSurface;
+using webkit::npapi::WebPluginAcceleratedSurface;
#endif
typedef std::map<CPBrowsingContext, WebPluginProxy*> ContextMap;
@@ -323,7 +324,8 @@ void WebPluginProxy::HandleURLRequest(const char* url,
// Please refer to https://bugzilla.mozilla.org/show_bug.cgi?id=366082
// for more details on this.
if (delegate_->GetQuirks() &
- WebPluginDelegateImpl::PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) {
+ webkit::npapi::WebPluginDelegateImpl::
+ PLUGIN_QUIRK_BLOCK_NONSTANDARD_GETURL_REQUESTS) {
GURL request_url(url);
if (!request_url.SchemeIs(chrome::kHttpScheme) &&
!request_url.SchemeIs(chrome::kHttpsScheme) &&
diff --git a/chrome/plugin/webplugin_proxy.h b/chrome/plugin/webplugin_proxy.h
index 66b396c..2a1f1aee 100644
--- a/chrome/plugin/webplugin_proxy.h
+++ b/chrome/plugin/webplugin_proxy.h
@@ -24,17 +24,23 @@
#include "chrome/common/chrome_plugin_api.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_message.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/webplugin.h"
class PluginChannel;
+
+namespace webkit {
+namespace npapi {
class WebPluginDelegateImpl;
+}
+}
+
#if defined(OS_MACOSX)
class WebPluginAcceleratedSurfaceProxy;
#endif
// This is an implementation of WebPlugin that proxies all calls to the
// renderer.
-class WebPluginProxy : public webkit_glue::WebPlugin {
+class WebPluginProxy : public webkit::npapi::WebPlugin {
public:
// Creates a new proxy for WebPlugin, using the given sender to send the
// marshalled WebPlugin calls.
@@ -45,7 +51,7 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
int host_render_view_routing_id);
~WebPluginProxy();
- void set_delegate(WebPluginDelegateImpl* d) { delegate_ = d; }
+ void set_delegate(webkit::npapi::WebPluginDelegateImpl* d) { delegate_ = d; }
// WebPlugin overrides
virtual void SetWindow(gfx::PluginWindowHandle window);
@@ -93,7 +99,7 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
// Returns a WebPluginResourceClient object given its id, or NULL if no
// object with that id exists.
- webkit_glue::WebPluginResourceClient* GetResourceClient(int id);
+ webkit::npapi::WebPluginResourceClient* GetResourceClient(int id);
// Returns the id of the renderer that contains this plugin.
int GetRendererId();
@@ -111,7 +117,7 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
// Notification received on a plugin issued resource request creation.
void OnResourceCreated(int resource_id,
- webkit_glue::WebPluginResourceClient* client);
+ webkit::npapi::WebPluginResourceClient* client);
virtual void HandleURLRequest(const char* url,
const char* method,
@@ -137,7 +143,7 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
virtual void SetDeferResourceLoading(unsigned long resource_id, bool defer);
virtual bool IsOffTheRecord();
virtual void ResourceClientDeleted(
- webkit_glue::WebPluginResourceClient* resource_client);
+ webkit::npapi::WebPluginResourceClient* resource_client);
gfx::NativeViewId containing_window() { return containing_window_; }
#if defined(OS_MACOSX)
@@ -145,7 +151,7 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
virtual void BindFakePluginWindowHandle(bool opaque);
- virtual webkit_glue::WebPluginAcceleratedSurface* GetAcceleratedSurface();
+ virtual webkit::npapi::WebPluginAcceleratedSurface* GetAcceleratedSurface();
// Tell the browser (via the renderer) to invalidate because the
// accelerated buffers have changed.
@@ -189,7 +195,7 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
const TransportDIB::Handle& background_buffer,
const gfx::Rect& window_rect);
- typedef base::hash_map<int, webkit_glue::WebPluginResourceClient*>
+ typedef base::hash_map<int, webkit::npapi::WebPluginResourceClient*>
ResourceClientMap;
ResourceClientMap resource_clients_;
@@ -198,7 +204,7 @@ class WebPluginProxy : public webkit_glue::WebPlugin {
uint32 cp_browsing_context_;
NPObject* window_npobject_;
NPObject* plugin_element_;
- WebPluginDelegateImpl* delegate_;
+ webkit::npapi::WebPluginDelegateImpl* delegate_;
gfx::Rect damaged_rect_;
bool waiting_for_paint_;
gfx::NativeViewId containing_window_;
diff --git a/chrome/renderer/blocked_plugin.cc b/chrome/renderer/blocked_plugin.cc
index e3d2a3a..68af8f8 100644
--- a/chrome/renderer/blocked_plugin.cc
+++ b/chrome/renderer/blocked_plugin.cc
@@ -22,9 +22,9 @@
#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
-#include "webkit/glue/plugins/plugin_group.h"
-#include "webkit/glue/plugins/webview_plugin.h"
#include "webkit/glue/webpreferences.h"
+#include "webkit/plugins/npapi/plugin_group.h"
+#include "webkit/plugins/npapi/webview_plugin.h"
using WebKit::WebContextMenuData;
using WebKit::WebFrame;
@@ -42,7 +42,7 @@ static const unsigned kMenuActionRemove = 2;
BlockedPlugin::BlockedPlugin(RenderView* render_view,
WebFrame* frame,
- const PluginGroup& info,
+ const webkit::npapi::PluginGroup& info,
const WebPluginParams& params,
const WebPreferences& preferences,
int template_id,
@@ -65,10 +65,10 @@ BlockedPlugin::BlockedPlugin(RenderView* render_view,
std::string html_data = jstemplate_builder::GetTemplatesHtml(
template_html, &values, "t");
- plugin_ = WebViewPlugin::Create(this,
- preferences,
- html_data,
- GURL(kBlockedPluginDataURL));
+ plugin_ = webkit::npapi::WebViewPlugin::Create(this,
+ preferences,
+ html_data,
+ GURL(kBlockedPluginDataURL));
registrar_.Add(this,
NotificationType::SHOULD_LOAD_PLUGINS,
diff --git a/chrome/renderer/blocked_plugin.h b/chrome/renderer/blocked_plugin.h
index 53859bc..7b616bf 100644
--- a/chrome/renderer/blocked_plugin.h
+++ b/chrome/renderer/blocked_plugin.h
@@ -11,26 +11,32 @@
#include "chrome/renderer/custom_menu_listener.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
#include "webkit/glue/cpp_bound_class.h"
-#include "webkit/glue/plugins/webview_plugin.h"
+#include "webkit/plugins/npapi/webview_plugin.h"
class GURL;
-class PluginGroup;
class RenderView;
+
+namespace webkit {
+namespace npapi {
+class PluginGroup;
+}
+}
+
class BlockedPlugin : public CppBoundClass,
- public WebViewPlugin::Delegate,
+ public webkit::npapi::WebViewPlugin::Delegate,
public NotificationObserver,
public CustomMenuListener {
public:
BlockedPlugin(RenderView* render_view,
WebKit::WebFrame* frame,
- const PluginGroup& info,
+ const webkit::npapi::PluginGroup& info,
const WebKit::WebPluginParams& params,
const WebPreferences& settings,
int template_id,
const string16& message);
- WebViewPlugin* plugin() { return plugin_; }
+ webkit::npapi::WebViewPlugin* plugin() { return plugin_; }
// WebViewPlugin::Delegate methods:
virtual void BindWebFrame(WebKit::WebFrame* frame);
@@ -62,7 +68,7 @@ class BlockedPlugin : public CppBoundClass,
RenderView* render_view_;
WebKit::WebFrame* frame_;
WebKit::WebPluginParams plugin_params_;
- WebViewPlugin* plugin_;
+ webkit::npapi::WebViewPlugin* plugin_;
// The name of the plugin that was blocked.
string16 name_;
diff --git a/chrome/renderer/pepper_devices.cc b/chrome/renderer/pepper_devices.cc
index aa98711..407d454 100644
--- a/chrome/renderer/pepper_devices.cc
+++ b/chrome/renderer/pepper_devices.cc
@@ -9,8 +9,8 @@
#include "chrome/renderer/webplugin_delegate_pepper.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkBitmap.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/webplugin.h"
namespace {
diff --git a/chrome/renderer/pepper_devices_browsertest.cc b/chrome/renderer/pepper_devices_browsertest.cc
index e8e0bbe..963975c 100644
--- a/chrome/renderer/pepper_devices_browsertest.cc
+++ b/chrome/renderer/pepper_devices_browsertest.cc
@@ -18,9 +18,9 @@
#include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugin_impl.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugin_impl.h"
class PepperDeviceTest;
@@ -135,9 +135,9 @@ class PepperDeviceTest : public RenderViewTest {
virtual void SetUp();
virtual void TearDown();
- NPAPI::PluginVersionInfo version_info_;
+ webkit::npapi::PluginVersionInfo version_info_;
- scoped_ptr<webkit_glue::WebPluginImpl> plugin_;
+ scoped_ptr<webkit::npapi::WebPluginImpl> plugin_;
WebPluginDelegatePepper* pepper_plugin_; // FIXME(brettw): check lifetime.
};
@@ -147,7 +147,7 @@ PepperDeviceTest::PepperDeviceTest() {
version_info_.file_description = ASCIIToWide("Pepper device test plugin");
version_info_.file_version = ASCIIToWide("1");
version_info_.mime_types = ASCIIToWide(kTestPluginMimeType);
- NPAPI::PluginEntryPoints entry_points = {
+ webkit::npapi::PluginEntryPoints entry_points = {
#if !defined(OS_POSIX) || defined(OS_MACOSX)
NP_GetEntryPoints,
#endif
@@ -163,14 +163,14 @@ PepperDeviceTest::~PepperDeviceTest() {
void PepperDeviceTest::SetUp() {
RenderViewTest::SetUp();
- NPAPI::PluginList::Singleton()->RegisterInternalPlugin(version_info_);
+ webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(version_info_);
// Create the WebKit plugin with no delegates (this seems to work
// sufficiently for the test).
WebKit::WebPluginParams params;
- plugin_.reset(new webkit_glue::WebPluginImpl(
+ plugin_.reset(new webkit::npapi::WebPluginImpl(
NULL, params, FilePath(), std::string(),
- base::WeakPtr<webkit_glue::WebPluginPageDelegate>()));
+ base::WeakPtr<webkit::npapi::WebPluginPageDelegate>()));
// Create a pepper plugin for the RenderView.
pepper_plugin_ = WebPluginDelegatePepper::Create(
@@ -201,7 +201,8 @@ void PepperDeviceTest::TearDown() {
if (pepper_plugin_)
pepper_plugin_->PluginDestroyed();
- NPAPI::PluginList::Singleton()->UnregisterInternalPlugin(version_info_.path);
+ webkit::npapi::PluginList::Singleton()->UnregisterInternalPlugin(
+ version_info_.path);
RenderViewTest::TearDown();
}
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.cc b/chrome/renderer/pepper_plugin_delegate_impl.cc
index 87aa127..e223202 100644
--- a/chrome/renderer/pepper_plugin_delegate_impl.cc
+++ b/chrome/renderer/pepper_plugin_delegate_impl.cc
@@ -41,7 +41,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/fileapi/file_system_callback_dispatcher.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/webplugin.h"
#include "webkit/plugins/ppapi/ppb_file_io_impl.h"
#include "webkit/plugins/ppapi/plugin_module.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
diff --git a/chrome/renderer/pepper_scrollbar_widget.cc b/chrome/renderer/pepper_scrollbar_widget.cc
index 63c446a..c4878a3 100644
--- a/chrome/renderer/pepper_scrollbar_widget.cc
+++ b/chrome/renderer/pepper_scrollbar_widget.cc
@@ -11,7 +11,7 @@
#include "skia/ext/platform_canvas.h"
#include "skia/ext/platform_device.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScrollbar.h"
-#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebInputEvent;
diff --git a/chrome/renderer/pepper_widget.cc b/chrome/renderer/pepper_widget.cc
index ba37f87..176510f 100644
--- a/chrome/renderer/pepper_widget.cc
+++ b/chrome/renderer/pepper_widget.cc
@@ -9,9 +9,9 @@
#include "chrome/renderer/pepper_scrollbar_widget.h"
#include "chrome/renderer/webplugin_delegate_pepper.h"
#include "skia/ext/platform_canvas.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/webplugin.h"
-#include "webkit/glue/plugins/webplugin_delegate.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
#if defined(OS_WIN)
#include "base/win/windows_version.h"
@@ -57,8 +57,8 @@ NPError NPPaintWidget(NPP instance,
if (iter == g_widgets.Get().end())
return NPERR_INVALID_PARAM;
- NPAPI::PluginInstance* plugin =
- static_cast<NPAPI::PluginInstance*>(instance->ndata);
+ webkit::npapi::PluginInstance* plugin =
+ static_cast<webkit::npapi::PluginInstance*>(instance->ndata);
WebPluginDelegatePepper* delegate =
static_cast<WebPluginDelegatePepper*>(plugin->webplugin()->delegate());
Graphics2DDeviceContext* gdc = delegate->GetGraphicsContext(context);
@@ -135,8 +135,8 @@ void PepperWidget::Init(NPP instance, int id) {
}
void PepperWidget::WidgetPropertyChanged(NPWidgetProperty property) {
- NPAPI::PluginInstance* instance =
- static_cast<NPAPI::PluginInstance*>(instance_->ndata);
+ webkit::npapi::PluginInstance* instance =
+ static_cast<webkit::npapi::PluginInstance*>(instance_->ndata);
NPPExtensions* extensions = NULL;
instance->NPP_GetValue(NPPVPepperExtensions, &extensions);
if (!extensions)
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc
index 1396713..495a234 100644
--- a/chrome/renderer/render_process_impl.cc
+++ b/chrome/renderer/render_process_impl.cc
@@ -35,8 +35,8 @@
#include "native_client/src/shared/imc/nacl_imc.h"
#include "native_client/src/trusted/plugin/nacl_entry_points.h"
#include "skia/ext/platform_canvas.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
#include "webkit/glue/webkit_glue.h"
#if defined(OS_MACOSX)
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 2c50d8e..5dd3359 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -172,18 +172,18 @@
#include "webkit/glue/image_resource_fetcher.h"
#include "webkit/glue/media/video_renderer_impl.h"
#include "webkit/glue/password_form_dom_manager.h"
-#include "webkit/glue/plugins/default_plugin_shared.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugin_delegate.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
-#include "webkit/glue/plugins/webplugin_impl.h"
-#include "webkit/glue/plugins/webview_plugin.h"
#include "webkit/glue/resource_fetcher.h"
#include "webkit/glue/site_isolation_metrics.h"
#include "webkit/glue/webaccessibility.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webmediaplayer_impl.h"
+#include "webkit/plugins/npapi/default_plugin_shared.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_impl.h"
+#include "webkit/plugins/npapi/webview_plugin.h"
#include "webkit/plugins/ppapi/ppapi_webplugin_impl.h"
#if defined(OS_WIN)
@@ -842,7 +842,7 @@ void RenderView::PluginCrashed(const FilePath& plugin_path) {
WebPlugin* RenderView::CreatePluginNoCheck(WebFrame* frame,
const WebPluginParams& params) {
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
bool found;
ContentSetting setting;
std::string mime_type;
@@ -2026,14 +2026,15 @@ void RenderView::OnMissingPluginStatus(
#if defined(OS_WIN)
if (!first_default_plugin_) {
// Show the InfoBar for the first available plugin.
- if (status == default_plugin::MISSING_PLUGIN_AVAILABLE) {
+ if (status == webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE) {
first_default_plugin_ = delegate->AsWeakPtr();
Send(new ViewHostMsg_MissingPluginStatus(routing_id_, status));
}
} else {
// Closes the InfoBar if user clicks on the plugin (instead of the InfoBar)
// to start the download/install.
- if (status == default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD) {
+ if (status ==
+ webkit::npapi::default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD) {
Send(new ViewHostMsg_MissingPluginStatus(routing_id_, status));
}
}
@@ -2754,7 +2755,7 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
bool found = false;
ContentSetting plugin_setting = CONTENT_SETTING_DEFAULT;
CommandLine* cmd = CommandLine::ForCurrentProcess();
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
GURL url(params.url);
std::string actual_mime_type;
Send(new ViewHostMsg_GetPluginInfo(url,
@@ -2769,8 +2770,8 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
return NULL;
DCHECK(plugin_setting != CONTENT_SETTING_DEFAULT);
- const PluginGroup* group =
- NPAPI::PluginList::Singleton()->GetPluginGroup(info);
+ const webkit::npapi::PluginGroup* group =
+ webkit::npapi::PluginList::Singleton()->GetPluginGroup(info);
DCHECK(group != NULL);
if (cmd->HasSwitch(switches::kBlockOutdatedPlugins) &&
@@ -2789,7 +2790,7 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
ContentSetting host_setting =
current_content_settings_.settings[CONTENT_SETTINGS_TYPE_PLUGINS];
- if (info.path.value() == kDefaultPluginLibraryName ||
+ if (info.path.value() == webkit::npapi::kDefaultPluginLibraryName ||
plugin_setting == CONTENT_SETTING_ALLOW ||
host_setting == CONTENT_SETTING_ALLOW) {
scoped_refptr<webkit::ppapi::PluginModule> pepper_module(
@@ -3939,7 +3940,7 @@ void RenderView::openFileSystem(
// webkit_glue::WebPluginPageDelegate -----------------------------------------
-webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate(
+webkit::npapi::WebPluginDelegate* RenderView::CreatePluginDelegate(
const FilePath& file_path,
const std::string& mime_type) {
if (!PluginChannelHost::IsListening())
@@ -4007,7 +4008,7 @@ webkit_glue::WebPluginDelegate* RenderView::CreatePluginDelegate(
return pepper_plugin;
} else {
#if defined(OS_WIN) // In-proc plugins aren't supported on Linux or Mac.
- return WebPluginDelegateImpl::Create(
+ return webkit::npapi::WebPluginDelegateImpl::Create(
file_path, mime_type, gfx::NativeViewFromId(host_window_));
#else
NOTIMPLEMENTED();
@@ -4034,7 +4035,7 @@ void RenderView::WillDestroyPluginWindow(gfx::PluginWindowHandle window) {
CleanupWindowInPluginMoves(window);
}
-void RenderView::DidMovePlugin(const webkit_glue::WebPluginGeometry& move) {
+void RenderView::DidMovePlugin(const webkit::npapi::WebPluginGeometry& move) {
SchedulePluginMove(move);
}
@@ -4436,18 +4437,19 @@ WebPlugin* RenderView::CreatePepperPlugin(
pepper_module, params, pepper_delegate_.AsWeakPtr());
}
-WebPlugin* RenderView::CreateNPAPIPlugin(WebFrame* frame,
- const WebPluginParams& params,
- const FilePath& path,
- const std::string& mime_type) {
- return new webkit_glue::WebPluginImpl(
+WebPlugin* RenderView::CreateNPAPIPlugin(
+ WebFrame* frame,
+ const WebPluginParams& params,
+ const FilePath& path,
+ const std::string& mime_type) {
+ return new webkit::npapi::WebPluginImpl(
frame, params, path, mime_type, AsWeakPtr());
}
WebPlugin* RenderView::CreatePluginPlaceholder(
WebFrame* frame,
const WebPluginParams& params,
- const PluginGroup& group,
+ const webkit::npapi::PluginGroup& group,
int resource_id,
int message_id) {
// |blocked_plugin| will delete itself when the WebViewPlugin
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index d7589dc..af7b969 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -43,8 +43,8 @@
#include "third_party/WebKit/WebKit/chromium/public/WebTextDirection.h"
#include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNavigationType.h"
-#include "webkit/glue/plugins/webplugin_page_delegate.h"
#include "webkit/glue/webpreferences.h"
+#include "webkit/plugins/npapi/webplugin_page_delegate.h"
#if defined(OS_WIN)
// RenderView is a diamond-shaped hierarchy, with WebWidgetClient at the root.
@@ -74,7 +74,6 @@ class NotificationProvider;
class PageClickTracker;
class PasswordAutocompleteManager;
class PepperDeviceTest;
-class PluginGroup;
class PrintWebViewHelper;
class RenderViewVisitor;
class SkBitmap;
@@ -97,12 +96,16 @@ class Rect;
}
namespace webkit {
-namespace ppapi {
+namespace npapi {
+class PluginGroup;
+} // namespace npapi
+
+namespace ppapi {
class PluginInstance;
class FullscreenContainer;
-
} // namespace ppapi
+
} // namespace webkit
namespace safe_browsing {
@@ -171,7 +174,7 @@ class RenderView : public RenderWidget,
public WebKit::WebViewClient,
public WebKit::WebFrameClient,
public WebKit::WebPageSerializerClient,
- public webkit_glue::WebPluginPageDelegate,
+ public webkit::npapi::WebPluginPageDelegate,
public base::SupportsWeakPtr<RenderView> {
public:
// Creates a new RenderView. The parent_hwnd specifies a HWND to use as the
@@ -650,12 +653,12 @@ class RenderView : public RenderWidget,
// webkit_glue::WebPluginPageDelegate implementation -------------------------
- virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate(
+ virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
const FilePath& file_path,
const std::string& mime_type);
virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle);
virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle);
- virtual void DidMovePlugin(const webkit_glue::WebPluginGeometry& move);
+ virtual void DidMovePlugin(const webkit::npapi::WebPluginGeometry& move);
virtual void DidStartLoadingForPlugin();
virtual void DidStopLoadingForPlugin();
virtual void ShowModalHTMLDialogForPlugin(
@@ -1026,7 +1029,7 @@ class RenderView : public RenderWidget,
WebKit::WebPlugin* CreatePluginPlaceholder(
WebKit::WebFrame* frame,
const WebKit::WebPluginParams& params,
- const PluginGroup& group,
+ const webkit::npapi::PluginGroup& group,
int resource_id,
int message_id);
@@ -1339,7 +1342,7 @@ class RenderView : public RenderWidget,
// Remember the first uninstalled plugin, so that we can ask the plugin
// to install itself when user clicks on the info bar.
- base::WeakPtr<webkit_glue::WebPluginDelegate> first_default_plugin_;
+ base::WeakPtr<webkit::npapi::WebPluginDelegate> first_default_plugin_;
PepperPluginDelegateImpl pepper_delegate_;
diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc
index 13c194d..041fcd9 100644
--- a/chrome/renderer/render_widget.cc
+++ b/chrome/renderer/render_widget.cc
@@ -27,8 +27,8 @@
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/plugins/npapi/webplugin.h"
#if defined(OS_POSIX)
#include "ipc/ipc_channel_posix.h"
@@ -955,7 +955,7 @@ void RenderWidget::resetInputMethod() {
}
void RenderWidget::SchedulePluginMove(
- const webkit_glue::WebPluginGeometry& move) {
+ const webkit::npapi::WebPluginGeometry& move) {
size_t i = 0;
for (; i < plugin_window_moves_.size(); ++i) {
if (plugin_window_moves_[i].window == move.window) {
diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h
index 0fd6634..92826e9 100644
--- a/chrome/renderer/render_widget.h
+++ b/chrome/renderer/render_widget.h
@@ -46,9 +46,11 @@ class WebWidget;
struct WebPopupMenuInfo;
}
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
struct WebPluginGeometry;
}
+}
// RenderWidget provides a communication bridge between a WebWidget and
// a RenderWidgetHost, the latter of which lives in a different process.
@@ -111,7 +113,7 @@ class RenderWidget : public IPC::Channel::Listener,
// Called when a plugin is moved. These events are queued up and sent with
// the next paint or scroll message to the host.
- void SchedulePluginMove(const webkit_glue::WebPluginGeometry& move);
+ void SchedulePluginMove(const webkit::npapi::WebPluginGeometry& move);
// Called when a plugin window has been destroyed, to make sure the currently
// pending moves don't try to reference it.
@@ -337,7 +339,7 @@ class RenderWidget : public IPC::Channel::Listener,
WebKit::WebPopupType popup_type_;
// Holds all the needed plugin window moves for a scroll.
- typedef std::vector<webkit_glue::WebPluginGeometry> WebPluginGeometryVector;
+ typedef std::vector<webkit::npapi::WebPluginGeometry> WebPluginGeometryVector;
WebPluginGeometryVector plugin_window_moves_;
// A custom background for the widget.
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index 5cae2a9..ae5984b 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -205,7 +205,8 @@ bool ClipboardReadFilenames(Clipboard::Buffer buffer,
return result;
}
-void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
+void GetPlugins(bool refresh,
+ std::vector<webkit::npapi::WebPluginInfo>* plugins) {
if (!RenderThread::current()->plugin_refresh_allowed())
refresh = false;
RenderThread::current()->Send(new ViewHostMsg_GetPlugins(refresh, plugins));
diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc
index 1d2be20..68a14ad 100644
--- a/chrome/renderer/webplugin_delegate_pepper.cc
+++ b/chrome/renderer/webplugin_delegate_pepper.cc
@@ -55,26 +55,26 @@
#include "third_party/npapi/bindings/npapi_extensions_private.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_lib.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/plugin_host.h"
-#include "webkit/glue/plugins/plugin_stream_url.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_host.h"
+#include "webkit/plugins/npapi/plugin_stream_url.h"
#if defined(ENABLE_GPU)
-#include "webkit/glue/plugins/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
#endif
#if defined(ENABLE_GPU)
using gpu::Buffer;
#endif
-using webkit_glue::WebPlugin;
-using webkit_glue::WebPluginDelegate;
-using webkit_glue::WebPluginResourceClient;
+using webkit::npapi::WebPlugin;
+using webkit::npapi::WebPluginDelegate;
+using webkit::npapi::WebPluginResourceClient;
using WebKit::WebCursorInfo;
using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
@@ -114,8 +114,8 @@ WebPluginDelegatePepper* WebPluginDelegatePepper::Create(
const FilePath& filename,
const std::string& mime_type,
const base::WeakPtr<RenderView>& render_view) {
- scoped_refptr<NPAPI::PluginLib> plugin_lib(
- NPAPI::PluginLib::CreatePluginLib(filename));
+ scoped_refptr<webkit::npapi::PluginLib> plugin_lib(
+ webkit::npapi::PluginLib::CreatePluginLib(filename));
if (plugin_lib.get() == NULL)
return NULL;
@@ -123,7 +123,7 @@ WebPluginDelegatePepper* WebPluginDelegatePepper::Create(
if (err != NPERR_NO_ERROR)
return NULL;
- scoped_refptr<NPAPI::PluginInstance> instance(
+ scoped_refptr<webkit::npapi::PluginInstance> instance(
plugin_lib->CreateInstance(mime_type));
return new WebPluginDelegatePepper(render_view,
instance.get());
@@ -544,7 +544,7 @@ string16 WebPluginDelegatePepper::GetSelectedText(bool html) const {
return string16();
string16 rv = UTF8ToUTF16(static_cast<char*>(text));
- NPAPI::PluginHost::Singleton()->host_functions()->memfree(text);
+ webkit::npapi::PluginHost::Singleton()->host_functions()->memfree(text);
return rv;
}
@@ -680,8 +680,8 @@ NPError WebPluginDelegatePepper::Device3DInitializeContext(
// Create an instance of the GPU plugin that is responsible for 3D
// rendering.
- nested_delegate_ = new WebPluginDelegateProxy(kGPUPluginMimeType,
- render_view_);
+ nested_delegate_ = new WebPluginDelegateProxy(
+ "application/vnd.google.chrome.gpu-plugin", render_view_);
// TODO(apatrick): should the GPU plugin be attached to plugin_?
if (nested_delegate_->Initialize(GURL(),
@@ -1270,7 +1270,8 @@ bool WebPluginDelegatePepper::VectorPrintPage(int page_number,
size_in_pixels.height(), true, false, true, true);
#endif // defined(OS_WIN)
- NPAPI::PluginHost::Singleton()->host_functions()->memfree(pdf_output);
+ webkit::npapi::PluginHost::Singleton()->host_functions()->memfree(
+ pdf_output);
return ret;
}
@@ -1378,7 +1379,7 @@ void WebPluginDelegatePepper::PrintEnd() {
WebPluginDelegatePepper::WebPluginDelegatePepper(
const base::WeakPtr<RenderView>& render_view,
- NPAPI::PluginInstance *instance)
+ webkit::npapi::PluginInstance *instance)
: render_view_(render_view),
plugin_(NULL),
instance_(instance),
@@ -1636,7 +1637,7 @@ void WebPluginDelegatePepper::SendNestedDelegateGeometryToBrowser(
return;
}
- webkit_glue::WebPluginGeometry geom;
+ webkit::npapi::WebPluginGeometry geom;
geom.window = nested_delegate_->GetPluginWindowHandle();
geom.window_rect = window_rect;
geom.clip_rect = clip_rect;
diff --git a/chrome/renderer/webplugin_delegate_pepper.h b/chrome/renderer/webplugin_delegate_pepper.h
index cfe34a1..6285424 100644
--- a/chrome/renderer/webplugin_delegate_pepper.h
+++ b/chrome/renderer/webplugin_delegate_pepper.h
@@ -22,19 +22,21 @@
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileChooserCompletion.h"
-#include "webkit/glue/plugins/webplugin_delegate.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
class FilePath;
class RenderView;
class WebCursor;
class WebPluginDelegateProxy;
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
class PluginInstance;
}
+}
// An implementation of WebPluginDelegate for Pepper in-process plugins.
-class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate,
+class WebPluginDelegatePepper : public webkit::npapi::WebPluginDelegate,
public WebKit::WebFileChooserCompletion {
public:
static WebPluginDelegatePepper* Create(
@@ -42,7 +44,7 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate,
const std::string& mime_type,
const base::WeakPtr<RenderView>& render_view);
- NPAPI::PluginInstance* instance() { return instance_.get(); }
+ webkit::npapi::PluginInstance* instance() { return instance_.get(); }
// WebKit::WebFileChooserCompletion implementation.
virtual void didChooseFile(
@@ -52,7 +54,7 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate,
virtual bool Initialize(const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
- webkit_glue::WebPlugin* plugin,
+ webkit::npapi::WebPlugin* plugin,
bool load_manually);
virtual void PluginDestroyed();
virtual void UpdateGeometry(const gfx::Rect& window_rect,
@@ -79,9 +81,9 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate,
virtual void DidFinishManualLoading();
virtual void DidManualLoadFail();
virtual void InstallMissingPlugin();
- virtual webkit_glue::WebPluginResourceClient* CreateResourceClient(
+ virtual webkit::npapi::WebPluginResourceClient* CreateResourceClient(
unsigned long resource_id, const GURL& url, int notify_id);
- virtual webkit_glue::WebPluginResourceClient* CreateSeekableResourceClient(
+ virtual webkit::npapi::WebPluginResourceClient* CreateSeekableResourceClient(
unsigned long resource_id, int range_request_id);
virtual bool StartFind(const string16& search_text,
bool case_sensitive,
@@ -208,7 +210,7 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate,
private:
WebPluginDelegatePepper(
const base::WeakPtr<RenderView>& render_view,
- NPAPI::PluginInstance *instance);
+ webkit::npapi::PluginInstance *instance);
~WebPluginDelegatePepper();
// Set a task that calls the repaint callback the next time the window
@@ -275,8 +277,8 @@ class WebPluginDelegatePepper : public webkit_glue::WebPluginDelegate,
base::WeakPtr<RenderView> render_view_;
- webkit_glue::WebPlugin* plugin_;
- scoped_refptr<NPAPI::PluginInstance> instance_;
+ webkit::npapi::WebPlugin* plugin_;
+ scoped_refptr<webkit::npapi::PluginInstance> instance_;
NPWindow window_;
gfx::Rect window_rect_;
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index 5c8d550..1b2e7d7 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -48,7 +48,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/webplugin.h"
#include "webkit/glue/webkit_glue.h"
#if defined(OS_POSIX)
@@ -65,7 +65,7 @@ using WebKit::WebView;
// Proxy for WebPluginResourceClient. The object owns itself after creation,
// deleting itself after its callback has been called.
-class ResourceClientProxy : public webkit_glue::WebPluginResourceClient {
+class ResourceClientProxy : public webkit::npapi::WebPluginResourceClient {
public:
ResourceClientProxy(PluginChannelHost* channel, int instance_id)
: channel_(channel), instance_id_(instance_id), resource_id_(0),
@@ -267,10 +267,11 @@ static bool SilverlightColorIsTransparent(const std::string& color) {
return false;
}
-bool WebPluginDelegateProxy::Initialize(const GURL& url,
+bool WebPluginDelegateProxy::Initialize(
+ const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
- webkit_glue::WebPlugin* plugin,
+ webkit::npapi::WebPlugin* plugin,
bool load_manually) {
IPC::ChannelHandle channel_handle;
if (!RenderThread::current()->Send(new ViewHostMsg_OpenChannelToPlugin(
@@ -1349,7 +1350,7 @@ void WebPluginDelegateProxy::OnHandleURLRequest(
params.popups_allowed, params.notify_redirects);
}
-webkit_glue::WebPluginResourceClient*
+webkit::npapi::WebPluginResourceClient*
WebPluginDelegateProxy::CreateResourceClient(
unsigned long resource_id, const GURL& url, int notify_id) {
if (!channel_host_)
@@ -1361,7 +1362,7 @@ WebPluginDelegateProxy::CreateResourceClient(
return proxy;
}
-webkit_glue::WebPluginResourceClient*
+webkit::npapi::WebPluginResourceClient*
WebPluginDelegateProxy::CreateSeekableResourceClient(
unsigned long resource_id, int range_request_id) {
if (!channel_host_)
@@ -1404,7 +1405,7 @@ bool WebPluginDelegateProxy::BindFakePluginWindowHandle(bool opaque) {
// Since this isn't a real window, it doesn't get initial size and location
// information the way a real windowed plugin would, so we need to feed it its
// starting geometry.
- webkit_glue::WebPluginGeometry geom;
+ webkit::npapi::WebPluginGeometry geom;
geom.window = fake_window;
geom.window_rect = plugin_rect_;
geom.clip_rect = clip_rect_;
@@ -1543,7 +1544,7 @@ bool WebPluginDelegateProxy::UseSynchronousGeometryUpdates() {
// The move networks plugin needs to be informed of geometry updates
// synchronously.
- std::vector<WebPluginMimeType>::iterator index;
+ std::vector<webkit::npapi::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/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h
index 2c20583..30e212e 100644
--- a/chrome/renderer/webplugin_delegate_proxy.h
+++ b/chrome/renderer/webplugin_delegate_proxy.h
@@ -18,8 +18,8 @@
#include "googleurl/src/gurl.h"
#include "ipc/ipc_channel.h"
#include "ipc/ipc_message.h"
-#include "webkit/glue/plugins/webplugininfo.h"
-#include "webkit/glue/plugins/webplugin_delegate.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
#if defined(OS_MACOSX)
#include "base/hash_tables.h"
@@ -44,14 +44,16 @@ namespace skia {
class PlatformCanvas;
}
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
class WebPlugin;
}
+}
// An implementation of WebPluginDelegate that proxies all calls to
// the plugin process.
class WebPluginDelegateProxy
- : public webkit_glue::WebPluginDelegate,
+ : public webkit::npapi::WebPluginDelegate,
public IPC::Channel::Listener,
public IPC::Message::Sender,
public base::SupportsWeakPtr<WebPluginDelegateProxy> {
@@ -64,7 +66,7 @@ class WebPluginDelegateProxy
virtual bool Initialize(const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
- webkit_glue::WebPlugin* plugin,
+ webkit::npapi::WebPlugin* plugin,
bool load_manually);
virtual void UpdateGeometry(const gfx::Rect& window_rect,
const gfx::Rect& clip_rect);
@@ -113,9 +115,9 @@ class WebPluginDelegateProxy
virtual void DidFinishManualLoading();
virtual void DidManualLoadFail();
virtual void InstallMissingPlugin();
- virtual webkit_glue::WebPluginResourceClient* CreateResourceClient(
+ virtual webkit::npapi::WebPluginResourceClient* CreateResourceClient(
unsigned long resource_id, const GURL& url, int notify_id);
- virtual webkit_glue::WebPluginResourceClient* CreateSeekableResourceClient(
+ virtual webkit::npapi::WebPluginResourceClient* CreateSeekableResourceClient(
unsigned long resource_id, int range_request_id);
CommandBufferProxy* CreateCommandBuffer();
@@ -231,13 +233,13 @@ class WebPluginDelegateProxy
#endif
base::WeakPtr<RenderView> render_view_;
- webkit_glue::WebPlugin* plugin_;
+ webkit::npapi::WebPlugin* plugin_;
bool uses_shared_bitmaps_;
gfx::PluginWindowHandle window_;
scoped_refptr<PluginChannelHost> channel_host_;
std::string mime_type_;
int instance_id_;
- WebPluginInfo info_;
+ webkit::npapi::WebPluginInfo info_;
gfx::Rect plugin_rect_;
gfx::Rect clip_rect_;
diff --git a/chrome/test/plugin/plugin_test.cpp b/chrome/test/plugin/plugin_test.cpp
index c68dd99..ed052a0 100644
--- a/chrome/test/plugin/plugin_test.cpp
+++ b/chrome/test/plugin/plugin_test.cpp
@@ -48,8 +48,9 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_status.h"
#include "third_party/npapi/bindings/npapi.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/plugin_switches.h"
#if defined(OS_WIN)
#include "base/win/registry.h"
@@ -90,7 +91,7 @@ class PluginTest : public UITest {
} else if (strcmp(test_info->name(), "MediaPlayerOld") == 0) {
// When testing the old WMP plugin, we need to force Chrome to not load
// the new plugin.
- launch_arguments_.AppendSwitch(kUseOldWMPPluginSwitch);
+ launch_arguments_.AppendSwitch(switches::kUseOldWMPPlugin);
} else if (strcmp(test_info->name(), "FlashSecurity") == 0) {
launch_arguments_.AppendSwitchASCII(switches::kTestSandbox,
"security_tests.dll");
diff --git a/webkit/glue/plugins/plugin_constants_win.h b/webkit/glue/plugins/plugin_constants_win.h
deleted file mode 100644
index 9913e5d..0000000
--- a/webkit/glue/plugins/plugin_constants_win.h
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright (c) 2006-2009 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.
-
-#ifndef WEBKIT_GLUE_PLUGIN_CONSTANTS_WIN_H_
-#define WEBKIT_GLUE_PLUGIN_CONSTANTS_WIN_H_
-
-// Used by the plugins_test when testing the older WMP plugin to force the new
-// plugin to not get loaded.
-#define kUseOldWMPPluginSwitch "use-old-wmp"
-
-// The window class name for a plugin window.
-#define kNativeWindowClassName L"NativeWindowClass"
-
-// 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.
-#define kWrapperNativeWindowClassName L"WrapperNativeWindowClass"
-
-// The name of the custom window message that the browser uses to tell the
-// plugin process to paint a window.
-#define kPaintMessageName L"Chrome_CustomPaint"
-
-// The name of the registry key which NPAPI plugins update on installation.
-#define kRegistryMozillaPlugins L"SOFTWARE\\MozillaPlugins"
-
-#define kMozillaActiveXPlugin L"npmozax.dll"
-#define kNewWMPPlugin L"np-mswmp.dll"
-#define kOldWMPPlugin L"npdsplay.dll"
-#define kYahooApplicationStatePlugin L"npystate.dll"
-#define kWanWangProtocolHandlerPlugin L"npww.dll"
-#define kFlashPlugin L"npswf32.dll"
-#define kAcrobatReaderPlugin L"nppdf32.dll"
-#define kRealPlayerPlugin L"nppl3260.dll"
-#define kSilverlightPlugin L"npctrl.dll"
-#define kJavaPlugin1 L"npjp2.dll"
-#define kJavaPlugin2 L"npdeploytk.dll"
-
-#define kGPUPluginMimeType "application/vnd.google.chrome.gpu-plugin"
-
-#endif // WEBKIT_GLUE_PLUGIN_PLUGIN_LIST_H_
diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h
index 734cc6d..111e8fa 100644
--- a/webkit/glue/plugins/plugin_list.h
+++ b/webkit/glue/plugins/plugin_list.h
@@ -5,332 +5,26 @@
#ifndef WEBKIT_GLUE_PLUGINS_PLUGIN_LIST_H_
#define WEBKIT_GLUE_PLUGINS_PLUGIN_LIST_H_
-#include <set>
-#include <string>
-#include <vector>
+// This file is here to keep NativeClient compiling. PluginList was moved to
+// webkit/plugins/npapi and into the webkit::npapi namespace. Native Client
+// depends on this old location & namespace, so we provide just enough
+// definitions here to keep it compiling until it can be updated to use the
+// new location & namespace.
+//
+// TODO(brettw) remove this flie when NaCl is updated.
-#include "base/basictypes.h"
-#include "base/file_path.h"
-#include "base/linked_ptr.h"
-#include "base/lock.h"
-#include "third_party/npapi/bindings/nphostapi.h"
-#include "webkit/glue/plugins/plugin_group.h"
-#include "webkit/glue/plugins/webplugininfo.h"
-
-class GURL;
-
-namespace base {
-
-template <typename T>
-struct DefaultLazyInstanceTraits;
-
-} // namespace base
+#include "webkit/plugins/npapi/plugin_list.h"
namespace NPAPI {
-#define kDefaultPluginLibraryName FILE_PATH_LITERAL("default_plugin")
-#define kGearsPluginLibraryName FILE_PATH_LITERAL("gears")
-
-class PluginInstance;
-
-// This struct holds entry points into a plugin. The entry points are
-// slightly different between Win/Mac and Unixes.
-struct PluginEntryPoints {
-#if !defined(OS_POSIX) || defined(OS_MACOSX)
- NP_GetEntryPointsFunc np_getentrypoints;
-#endif
- NP_InitializeFunc np_initialize;
- NP_ShutdownFunc np_shutdown;
-};
-
-// This struct fully describes a plugin. For external plugins, it's read in from
-// the version info of the dll; For internal plugins, it's predefined and
-// includes addresses of entry functions. (Yes, it's Win32 NPAPI-centric, but
-// it'll do for holding descriptions of internal plugins cross-platform.)
-struct PluginVersionInfo {
- FilePath path;
- // Info about the plugin itself.
- std::wstring product_name;
- std::wstring file_description;
- std::wstring file_version;
- // Info about the data types that the plugin supports.
- std::wstring mime_types;
- std::wstring file_extensions;
- std::wstring type_descriptions;
- // Entry points for internal plugins. Pointers are NULL for external plugins.
- PluginEntryPoints entry_points;
-};
+typedef webkit::npapi::PluginEntryPoints PluginEntryPoints;
+typedef webkit::npapi::PluginVersionInfo PluginVersionInfo;
-// The PluginList is responsible for loading our NPAPI based plugins. It does
-// so in whatever manner is appropriate for the platform. On Windows, it loads
-// plugins from a known directory by looking for DLLs which start with "NP",
-// and checking to see if they are valid NPAPI libraries. On the Mac, it walks
-// the machine-wide and user plugin directories and loads anything that has
-// the correct types. On Linux, it walks the plugin directories as well
-// (e.g. /usr/lib/browser-plugins/).
-// This object is thread safe.
class PluginList {
public:
- // Gets the one instance of the PluginList.
- static PluginList* Singleton();
-
- // Returns true if we're in debug-plugin-loading mode. This is controlled
- // by a command line switch.
- static bool DebugPluginLoading();
-
- static const PluginGroupDefinition* GetPluginGroupDefinitions();
- static size_t GetPluginGroupDefinitionsSize();
-
- // Returns true iff the plugin list has been loaded already.
- bool PluginsLoaded();
-
- // Cause the plugin list to refresh next time they are accessed, regardless
- // of whether they are already loaded.
- void RefreshPlugins();
-
- // Add/Remove an extra plugin to load when we actually do the loading. Must
- // be called before the plugins have been loaded.
- void AddExtraPluginPath(const FilePath& plugin_path);
- void RemoveExtraPluginPath(const FilePath& plugin_path);
-
- // Same as above, but specifies a directory in which to search for plugins.
- void AddExtraPluginDir(const FilePath& plugin_dir);
-
- // Register an internal plugin with the specified plugin information and
- // function pointers. An internal plugin must be registered before it can
- // be loaded using PluginList::LoadPlugin().
- void RegisterInternalPlugin(const PluginVersionInfo& info);
-
- // Removes a specified internal plugin from the list. The search will match
- // on the path from the version info previously registered.
- //
- // This is generally only necessary for tests.
- void UnregisterInternalPlugin(const FilePath& path);
-
- // Creates a WebPluginInfo structure given a plugin's path. On success
- // returns true, with the information being put into "info". If it's an
- // internal plugin, "entry_points" is filled in as well with a
- // internally-owned PluginEntryPoints pointer.
- // Returns false if the library couldn't be found, or if it's not a plugin.
- bool ReadPluginInfo(const FilePath& filename,
- WebPluginInfo* info,
- const PluginEntryPoints** entry_points);
-
- // Populate a WebPluginInfo from a PluginVersionInfo.
- static bool CreateWebPluginInfo(const PluginVersionInfo& pvi,
- WebPluginInfo* info);
-
- // Shutdown all plugins. Should be called at process teardown.
- void Shutdown();
-
- // Get all the plugins.
- void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins);
-
- // Get all the enabled plugins.
- void GetEnabledPlugins(bool refresh, 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
- // which |info->enabled| is false). The mime type which corresponds
- // to the URL is optionally returned back in |actual_mime_types| (if
- // it is non-NULL), one for each of the plugin info objects found.
- // The |allow_wildcard| parameter controls whether this function
- // returns plugins which support wildcard mime types (* as the mime
- // type). The |info| parameter is required to be non-NULL. The
- // list is in order of "most desirable" to "least desirable",
- // meaning that the default plugin is at the end of the list.
- void GetPluginInfoArray(const GURL& url,
- const std::string& mime_type,
- bool allow_wildcard,
- std::vector<WebPluginInfo>* info,
- std::vector<std::string>* actual_mime_types);
-
- // Returns the first item from the list returned in GetPluginInfo in |info|.
- // Returns true if it found a match. |actual_mime_type| may be NULL.
- bool GetPluginInfo(const GURL& url,
- const std::string& mime_type,
- bool allow_wildcard,
- WebPluginInfo* info,
- std::string* actual_mime_type);
-
- // Get plugin info by plugin path (including disabled plugins). Returns true
- // if the plugin is found and WebPluginInfo has been filled in |info|.
- bool GetPluginInfoByPath(const FilePath& plugin_path,
- WebPluginInfo* info);
-
- // Populates the given vector with all available plugin groups.
- void GetPluginGroups(bool load_if_necessary,
- std::vector<PluginGroup>* plugin_groups);
-
- // Returns the PluginGroup corresponding to the given WebPluginInfo. If no
- // such group exists, it is created and added to the cache.
- // Beware: when calling this from the Browser process, the group that the
- // returned pointer points to might disappear suddenly. This happens when
- // |RefreshPlugins()| is called and then |LoadPlugins()| is triggered by a
- // call to |GetPlugins()|, |GetEnabledPlugins()|, |GetPluginInfoArray()|,
- // |GetPluginInfoByPath()|, or |GetPluginGroups(true, _)|. It is the caller's
- // responsibility to make sure this doesn't happen.
- const PluginGroup* GetPluginGroup(const WebPluginInfo& web_plugin_info);
-
- // Returns the name of the PluginGroup with the given identifier.
- // If no such group exists, an empty string is returned.
- string16 GetPluginGroupName(std::string identifier);
-
- // Returns the identifier string of the PluginGroup corresponding to the given
- // WebPluginInfo. If no such group exists, it is created and added to the
- // cache.
- std::string GetPluginGroupIdentifier(const WebPluginInfo& web_plugin_info);
-
- // Load a specific plugin with full path.
- void LoadPlugin(const FilePath& filename,
- std::vector<WebPluginInfo>* plugins);
-
- // Enable a specific plugin, specified by path. Returns |true| iff a plugin
- // currently in the plugin list was actually enabled as a result; regardless
- // of return value, if a plugin is found in the future with the given name, it
- // will be enabled. Note that plugins are enabled by default as far as
- // |PluginList| is concerned.
- bool EnablePlugin(const FilePath& filename);
-
- // Disable a specific plugin, specified by path. Returns |true| iff a plugin
- // currently in the plugin list was actually disabled as a result; regardless
- // of return value, if a plugin is found in the future with the given name, it
- // will be disabled.
- bool DisablePlugin(const FilePath& filename);
-
- // Enable/disable a plugin group, specified by group_name. Returns |true| iff
- // a plugin currently in the plugin list was actually enabled/disabled as a
- // result; regardless of return value, if a plugin is found in the future with
- // the given name, it will be enabled/disabled. Note that plugins are enabled
- // by default as far as |PluginList| is concerned.
- bool EnableGroup(bool enable, const string16& name);
-
- // Disable all plugins groups that are known to be outdated, according to
- // the information hardcoded in PluginGroup, to make sure that they can't
- // be loaded on a web page and instead show a UI to update to the latest
- // version.
- void DisableOutdatedPluginGroups();
-
- ~PluginList();
-
- private:
- FRIEND_TEST_ALL_PREFIXES(PluginGroupTest, PluginGroupDefinition);
-
- // Constructors are private for singletons
- PluginList();
-
- // Creates PluginGroups for the static group definitions, and adds them to
- // the PluginGroup cache of this PluginList.
- void AddHardcodedPluginGroups();
-
- // Adds the given WebPluginInfo to its corresponding group, creating it if
- // necessary, and returns the group.
- // Callers need to protect calls to this method by a lock themselves.
- PluginGroup* AddToPluginGroups(const WebPluginInfo& web_plugin_info);
-
- // Load all plugins from the default plugins directory
- void LoadPlugins(bool refresh);
-
- // Load all plugins from a specific directory.
- // |plugins| is updated with loaded plugin information.
- // |visited_plugins| is updated with paths to all plugins that were considered
- // (including those we didn't load)
- void LoadPluginsFromDir(const FilePath& path,
- std::vector<WebPluginInfo>* plugins,
- std::set<FilePath>* visited_plugins);
-
- // Returns true if we should load the given plugin, or false otherwise.
- // plugins is the list of plugins we have crawled in the current plugin
- // loading run.
- bool ShouldLoadPlugin(const WebPluginInfo& info,
- std::vector<WebPluginInfo>* plugins);
-
- // Return whether a plug-in group with the given name should be disabled,
- // either because it already is on the list of disabled groups, or because it
- // is blacklisted by a policy. In the latter case, add the plugin group to the
- // list of disabled groups as well.
- bool ShouldDisableGroup(const string16& group_name);
-
- // Returns true if the given WebPluginInfo supports "mime-type".
- // mime_type should be all lower case.
- static bool SupportsType(const WebPluginInfo& info,
- const std::string &mime_type,
- bool allow_wildcard);
-
- // Returns true if the given WebPluginInfo 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.
- static bool SupportsExtension(const WebPluginInfo& info,
- const std::string &extension,
- std::string* actual_mime_type);
-
- //
- // Platform functions
- //
-
- // Do any initialization.
- void PlatformInit();
-
- // Get the ordered list of directories from which to load plugins
- void GetPluginDirectories(std::vector<FilePath>* plugin_dirs);
-
- //
- // Command-line switches
- //
-
-#if defined(OS_WIN)
- // true if we shouldn't load the new WMP plugin.
- bool dont_load_new_wmp_;
-
- // Loads plugins registered under HKCU\Software\MozillaPlugins and
- // HKLM\Software\MozillaPlugins.
- void LoadPluginsFromRegistry(std::vector<WebPluginInfo>* plugins,
- std::set<FilePath>* visited_plugins);
-#endif
-
- //
- // Internals
- //
-
- bool plugins_loaded_;
-
- // If true, we reload plugins even if they've been loaded already.
- bool plugins_need_refresh_;
-
- // Contains information about the available plugins.
- std::vector<WebPluginInfo> plugins_;
-
- // Extra plugin paths that we want to search when loading.
- std::vector<FilePath> extra_plugin_paths_;
-
- // Extra plugin directories that we want to search when loading.
- std::vector<FilePath> extra_plugin_dirs_;
-
- // Holds information about internal plugins.
- std::vector<PluginVersionInfo> internal_plugins_;
-
- // Path names of plugins to disable (the default is to enable them all).
- std::set<FilePath> disabled_plugins_;
-
- // Group names to disable (the default is to enable them all).
- std::set<string16> disabled_groups_;
-
- bool disable_outdated_plugins_;
-
- // Holds the currently available plugin groups.
- PluginGroup::PluginMap plugin_groups_;
-
- int next_priority_;
-
- // Need synchronization for the above members since this object can be
- // accessed on multiple threads.
- Lock lock_;
-
- friend struct base::DefaultLazyInstanceTraits<PluginList>;
-
- DISALLOW_COPY_AND_ASSIGN(PluginList);
+ static inline webkit::npapi::PluginList* Singleton() {
+ return webkit::npapi::PluginList::Singleton();
+ }
};
} // namespace NPAPI
diff --git a/webkit/glue/plugins/plugin_stubs.cc b/webkit/glue/plugins/plugin_stubs.cc
deleted file mode 100644
index f8210c30..0000000
--- a/webkit/glue/plugins/plugin_stubs.cc
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2006-2008 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.
-
-// This file stubs out some functions needed to make the linker happy
-// without linking in all the plugin code. It should be removed once
-// we have plugins working on all platforms.
-
-// TODO(port): remove this file.
-
-#include "base/logging.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_stream.h"
-
-namespace NPAPI {
-
-PluginStream::~PluginStream() {
- NOTIMPLEMENTED();
-}
-
-bool PluginStream::Close(NPReason reason) {
- NOTIMPLEMENTED();
- return false;
-}
-
-void PluginInstance::NPP_StreamAsFile(NPStream*, const char*) {
- NOTIMPLEMENTED();
-}
-
-} // namespace NPAPI
diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi
index 13545b8..14ca0bb 100644
--- a/webkit/glue/webkit_glue.gypi
+++ b/webkit/glue/webkit_glue.gypi
@@ -168,6 +168,75 @@
# 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/carbon_plugin_window_tracker_mac.cc',
+ '../plugins/npapi/carbon_plugin_window_tracker_mac.h',
+ '../plugins/npapi/coregraphics_private_symbols_mac.h',
+ '../plugins/npapi/default_plugin_shared.h',
+ '../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/npapi_extension_thunk.cc',
+ '../plugins/npapi/npapi_extension_thunk.h',
+ '../plugins/npapi/nphostapi.h',
+ '../plugins/npapi/plugin_constants_win.cc',
+ '../plugins/npapi/plugin_constants_win.h',
+ '../plugins/npapi/plugin_group.cc',
+ '../plugins/npapi/plugin_group.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/ppb_private.h',
+ '../plugins/npapi/quickdraw_drawing_manager_mac.cc',
+ '../plugins/npapi/quickdraw_drawing_manager_mac.h',
+ '../plugins/npapi/webplugin.cc',
+ '../plugins/npapi/webplugin.h',
+ '../plugins/npapi/webplugin_2d_device_delegate.cc',
+ '../plugins/npapi/webplugin_2d_device_delegate.h',
+ '../plugins/npapi/webplugin_3d_device_delegate.cc',
+ '../plugins/npapi/webplugin_3d_device_delegate.h',
+ '../plugins/npapi/webplugin_accelerated_surface_mac.h',
+ '../plugins/npapi/webplugin_audio_device_delegate.cc',
+ '../plugins/npapi/webplugin_audio_device_delegate.h',
+ '../plugins/npapi/webplugin_delegate.cc',
+ '../plugins/npapi/webplugin_delegate.h',
+ '../plugins/npapi/webplugin_delegate_impl.cc',
+ '../plugins/npapi/webplugin_delegate_impl.h',
+ '../plugins/npapi/webplugin_delegate_impl_gtk.cc',
+ '../plugins/npapi/webplugin_delegate_impl_mac.mm',
+ '../plugins/npapi/webplugin_delegate_impl_win.cc',
+ '../plugins/npapi/webplugin_file_delegate.cc',
+ '../plugins/npapi/webplugin_file_delegate.h',
+ '../plugins/npapi/webplugin_impl.cc',
+ '../plugins/npapi/webplugin_impl.h',
+ '../plugins/npapi/webplugin_print_delegate.cc',
+ '../plugins/npapi/webplugin_print_delegate.h',
+ '../plugins/npapi/webplugininfo.cc',
+ '../plugins/npapi/webplugininfo.h',
+ '../plugins/npapi/webview_plugin.cc',
+ '../plugins/npapi/webview_plugin.h',
'../plugins/plugin_switches.cc',
'../plugins/plugin_switches.h',
'../plugins/ppapi/common.h',
@@ -182,14 +251,14 @@
'../plugins/ppapi/npapi_glue.cc',
'../plugins/ppapi/npapi_glue.h',
'../plugins/ppapi/plugin_delegate.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/plugin_module.cc',
'../plugins/ppapi/plugin_module.h',
'../plugins/ppapi/plugin_object.cc',
'../plugins/ppapi/plugin_object.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_buffer_impl.cc',
@@ -265,75 +334,6 @@
'media/web_data_source.cc',
'media/web_data_source.h',
'media/web_video_renderer.h',
- 'plugins/carbon_plugin_window_tracker_mac.h',
- 'plugins/carbon_plugin_window_tracker_mac.cc',
- 'plugins/coregraphics_private_symbols_mac.h',
- 'plugins/default_plugin_shared.h',
- 'plugins/nphostapi.h',
- 'plugins/gtk_plugin_container.h',
- 'plugins/gtk_plugin_container.cc',
- 'plugins/gtk_plugin_container_manager.h',
- 'plugins/gtk_plugin_container_manager.cc',
- 'plugins/npapi_extension_thunk.cc',
- 'plugins/npapi_extension_thunk.h',
- 'plugins/plugin_constants_win.h',
- 'plugins/plugin_group.cc',
- 'plugins/plugin_group.h',
- 'plugins/plugin_host.cc',
- 'plugins/plugin_host.h',
- 'plugins/plugin_instance.cc',
- 'plugins/plugin_instance.h',
- 'plugins/plugin_instance_mac.mm',
- 'plugins/plugin_lib.cc',
- 'plugins/plugin_lib.h',
- 'plugins/plugin_lib_mac.mm',
- 'plugins/plugin_lib_posix.cc',
- 'plugins/plugin_lib_win.cc',
- 'plugins/plugin_list.cc',
- 'plugins/plugin_list.h',
- 'plugins/plugin_list_mac.mm',
- 'plugins/plugin_list_posix.cc',
- 'plugins/plugin_list_win.cc',
- 'plugins/plugin_stream.cc',
- 'plugins/plugin_stream.h',
- 'plugins/plugin_stream_posix.cc',
- 'plugins/plugin_stream_url.cc',
- 'plugins/plugin_stream_url.h',
- 'plugins/plugin_stream_win.cc',
- 'plugins/plugin_string_stream.cc',
- 'plugins/plugin_string_stream.h',
- 'plugins/plugin_stubs.cc',
- 'plugins/plugin_web_event_converter_mac.h',
- 'plugins/plugin_web_event_converter_mac.mm',
- 'plugins/ppb_private.h',
- 'plugins/quickdraw_drawing_manager_mac.h',
- 'plugins/quickdraw_drawing_manager_mac.cc',
- 'plugins/webview_plugin.cc',
- 'plugins/webview_plugin.h',
- 'plugins/webplugin.cc',
- 'plugins/webplugin.h',
- 'plugins/webplugin_audio_device_delegate.cc',
- 'plugins/webplugin_audio_device_delegate.h',
- 'plugins/webplugin_2d_device_delegate.cc',
- 'plugins/webplugin_2d_device_delegate.h',
- 'plugins/webplugin_3d_device_delegate.cc',
- 'plugins/webplugin_3d_device_delegate.h',
- 'plugins/webplugin_accelerated_surface_mac.h',
- 'plugins/webplugin_delegate.cc',
- 'plugins/webplugin_delegate.h',
- 'plugins/webplugin_delegate_impl.cc',
- 'plugins/webplugin_delegate_impl.h',
- 'plugins/webplugin_delegate_impl_gtk.cc',
- 'plugins/webplugin_delegate_impl_mac.mm',
- 'plugins/webplugin_delegate_impl_win.cc',
- 'plugins/webplugin_file_delegate.cc',
- 'plugins/webplugin_file_delegate.h',
- 'plugins/webplugin_impl.cc',
- 'plugins/webplugin_impl.h',
- 'plugins/webplugin_print_delegate.cc',
- 'plugins/webplugin_print_delegate.h',
- 'plugins/webplugininfo.cc',
- 'plugins/webplugininfo.h',
'alt_error_page_resource_fetcher.cc',
'alt_error_page_resource_fetcher.h',
'context_menu.cc',
diff --git a/webkit/glue/webkit_glue.h b/webkit/glue/webkit_glue.h
index fbb541a..38ea659 100644
--- a/webkit/glue/webkit_glue.h
+++ b/webkit/glue/webkit_glue.h
@@ -23,7 +23,6 @@
class GURL;
class SkBitmap;
-struct WebPluginInfo;
namespace base {
class StringPiece;
@@ -39,6 +38,12 @@ class WebString;
class WebView;
}
+namespace webkit {
+namespace npapi {
+struct WebPluginInfo;
+}
+}
+
namespace webkit_glue {
@@ -225,7 +230,8 @@ bool GetApplicationDirectory(FilePath* path);
bool GetExeDirectory(FilePath* path);
// Embedders implement this function to return the list of plugins to Webkit.
-void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins);
+void GetPlugins(bool refresh,
+ std::vector<webkit::npapi::WebPluginInfo>* plugins);
// Returns true if the plugins run in the same process as the renderer, and
// false otherwise.
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 5346181..844aae7 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -35,8 +35,8 @@
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "webkit/glue/media/audio_decoder.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/websocketstreamhandle_impl.h"
#include "webkit/glue/weburlloader_impl.h"
@@ -225,18 +225,18 @@ WebString WebKitClientImpl::userAgent(const WebURL& url) {
void WebKitClientImpl::getPluginList(bool refresh,
WebPluginListBuilder* builder) {
- std::vector<WebPluginInfo> plugins;
+ std::vector<webkit::npapi::WebPluginInfo> plugins;
GetPlugins(refresh, &plugins);
for (size_t i = 0; i < plugins.size(); ++i) {
- const WebPluginInfo& plugin = plugins[i];
+ const webkit::npapi::WebPluginInfo& plugin = plugins[i];
builder->addPlugin(
plugin.name, plugin.desc,
FilePathStringToWebString(plugin.path.BaseName().value()));
for (size_t j = 0; j < plugin.mime_types.size(); ++j) {
- const WebPluginMimeType& mime_type = plugin.mime_types[j];
+ const webkit::npapi::WebPluginMimeType& mime_type = plugin.mime_types[j];
builder->addMediaTypeToLastPlugin(
WebString::fromUTF8(mime_type.mime_type), mime_type.description);
diff --git a/webkit/glue/plugins/DEPS b/webkit/plugins/npapi/DEPS
index 024a4ef..c3cbc8c 100644
--- a/webkit/glue/plugins/DEPS
+++ b/webkit/plugins/npapi/DEPS
@@ -1,4 +1,5 @@
include_rules = [
+ "+app",
"+ppapi",
# Files in this directory must not depend on the proxy, because the proxy
@@ -6,4 +7,5 @@ include_rules = [
"-ppapi/proxy",
"+printing",
+ "+skia",
]
diff --git a/webkit/glue/plugins/carbon_plugin_window_tracker_mac.cc b/webkit/plugins/npapi/carbon_plugin_window_tracker_mac.cc
index c4ae72d..d652c9c 100644
--- a/webkit/glue/plugins/carbon_plugin_window_tracker_mac.cc
+++ b/webkit/plugins/npapi/carbon_plugin_window_tracker_mac.cc
@@ -2,8 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h"
+
#include "base/logging.h"
-#include "webkit/glue/plugins/carbon_plugin_window_tracker_mac.h"
+
+namespace webkit {
+namespace npapi {
CarbonPluginWindowTracker::CarbonPluginWindowTracker() {
}
@@ -53,3 +57,6 @@ void CarbonPluginWindowTracker::DestroyDummyWindowForDelegate(
if (window) // Check just in case the initial window creation failed.
DisposeWindow(window);
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/carbon_plugin_window_tracker_mac.h b/webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h
index 90fc318..65d12c8 100644
--- a/webkit/glue/plugins/carbon_plugin_window_tracker_mac.h
+++ b/webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h
@@ -2,14 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_
-#define WEBKIT_GLUE_PLUGINS_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_
+#define WEBKIT_PLUGINS_NPAPI_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_
#include <Carbon/Carbon.h>
#include <map>
#include "base/basictypes.h"
+namespace webkit {
+namespace npapi {
+
// This is really a WebPluginDelegateImpl, but that class is private to the
// framework, and these functions are called from a dylib.
typedef void* OpaquePluginRef;
@@ -50,4 +53,7 @@ class __attribute__((visibility("default"))) CarbonPluginWindowTracker {
DISALLOW_COPY_AND_ASSIGN(CarbonPluginWindowTracker);
};
-#endif // WEBKIT_GLUE_PLUGINS_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_CARBON_PLUGIN_WINDOW_TRACKER_MAC_H_
diff --git a/webkit/glue/plugins/coregraphics_private_symbols_mac.h b/webkit/plugins/npapi/coregraphics_private_symbols_mac.h
index 0342d6f..b51153f 100644
--- a/webkit/glue/plugins/coregraphics_private_symbols_mac.h
+++ b/webkit/plugins/npapi/coregraphics_private_symbols_mac.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_COREGRAPHICS_PRIVATE_SYMBOLS_MAC_H_
-#define WEBKIT_GLUE_PLUGINS_COREGRAPHICS_PRIVATE_SYMBOLS_MAC_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_COREGRAPHICS_PRIVATE_SYMBOLS_MAC_H_
+#define WEBKIT_PLUGINS_NPAPI_COREGRAPHICS_PRIVATE_SYMBOLS_MAC_H_
// These are CoreGraphics SPI, verified to exist in both 10.5 and 10.6.
@@ -24,4 +24,4 @@ int _CGSDefaultConnection(void);
} // extern "C"
#endif
-#endif // WEBKIT_GLUE_PLUGINS_COREGRAPHICS_PRIVATE_SYMBOLS_MAC_H_
+#endif // WEBKIT_PLUGINS_NPAPI_COREGRAPHICS_PRIVATE_SYMBOLS_MAC_H_
diff --git a/webkit/glue/plugins/default_plugin_shared.h b/webkit/plugins/npapi/default_plugin_shared.h
index 79d06b3..e1ab659 100644
--- a/webkit/glue/plugins/default_plugin_shared.h
+++ b/webkit/plugins/npapi/default_plugin_shared.h
@@ -5,8 +5,11 @@
// Thes file contains stuff that should be shared among projects that do some
// special handling with default plugin
-#ifndef WEBKIT_GLUE_PLUGINS_DEFAULT_PLUGIN_SHARED_H
-#define WEBKIT_GLUE_PLUGINS_DEFAULT_PLUGIN_SHARED_H
+#ifndef WEBKIT_PLUGINS_NPAPI_DEFAULT_PLUGIN_SHARED_H
+#define WEBKIT_PLUGINS_NPAPI_DEFAULT_PLUGIN_SHARED_H
+
+namespace webkit {
+namespace npapi {
namespace default_plugin {
@@ -28,4 +31,7 @@ const int kInstallMissingPluginMessage = WM_APP + 117;
} // namespace default_plugin
-#endif // WEBKIT_GLUE_PLUGINS_DEFAULT_PLUGIN_SHARED_H
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_DEFAULT_PLUGIN_SHARED_H
diff --git a/webkit/glue/plugins/gtk_plugin_container.cc b/webkit/plugins/npapi/gtk_plugin_container.cc
index c80bbf1..056d31e 100644
--- a/webkit/glue/plugins/gtk_plugin_container.cc
+++ b/webkit/plugins/npapi/gtk_plugin_container.cc
@@ -2,12 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/gtk_plugin_container.h"
+#include "webkit/plugins/npapi/gtk_plugin_container.h"
#include <gtk/gtk.h>
#include "base/basictypes.h"
+namespace webkit {
+namespace npapi {
+
namespace {
// NOTE: This class doesn't have constructors/destructors, it is created
@@ -71,7 +74,7 @@ class GtkPluginContainer : public GtkSocket {
DISALLOW_IMPLICIT_CONSTRUCTORS(GtkPluginContainer);
};
-} // anonymous namespace
+} // namespace
// Create a new instance of our GTK widget object.
GtkWidget* gtk_plugin_container_new() {
@@ -83,3 +86,6 @@ void gtk_plugin_container_set_size(GtkWidget *widget, int width, int height) {
// Signal the parent that the size request has changed.
gtk_widget_queue_resize_no_redraw(widget);
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/gtk_plugin_container.h b/webkit/plugins/npapi/gtk_plugin_container.h
index eed6b94..aee11c2 100644
--- a/webkit/glue/plugins/gtk_plugin_container.h
+++ b/webkit/plugins/npapi/gtk_plugin_container.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_GTK_PLUGIN_CONTAINER_H_
-#define WEBKIT_GLUE_PLUGINS_GTK_PLUGIN_CONTAINER_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_GTK_PLUGIN_CONTAINER_H_
+#define WEBKIT_PLUGINS_NPAPI_GTK_PLUGIN_CONTAINER_H_
// Windowed plugins are embedded via XEmbed, which is implemented by
// GtkPlug/GtkSocket. But we want to control sizing and positioning
@@ -15,6 +15,9 @@
typedef struct _GtkWidget GtkWidget;
+namespace webkit {
+namespace npapi {
+
// Return a new GtkPluginContainer.
// Intentionally GTK-style here since we're creating a custom GTK widget.
// This is a GtkSocket subclass; see its documentation for available methods.
@@ -23,4 +26,7 @@ GtkWidget* gtk_plugin_container_new();
// Sets the size of the GtkPluginContainer.
void gtk_plugin_container_set_size(GtkWidget *widget, int width, int height);
-#endif // WEBKIT_GLUE_PLUGINS_GTK_PLUGIN_CONTAINER_H_
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_GTK_PLUGIN_CONTAINER_H_
diff --git a/webkit/glue/plugins/gtk_plugin_container_manager.cc b/webkit/plugins/npapi/gtk_plugin_container_manager.cc
index 2f82b24..5b9876a 100644
--- a/webkit/glue/plugins/gtk_plugin_container_manager.cc
+++ b/webkit/plugins/npapi/gtk_plugin_container_manager.cc
@@ -2,14 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/gtk_plugin_container_manager.h"
+#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
#include <gtk/gtk.h>
#include "base/logging.h"
#include "gfx/gtk_util.h"
-#include "webkit/glue/plugins/gtk_plugin_container.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/gtk_plugin_container.h"
+#include "webkit/plugins/npapi/webplugin.h"
+
+namespace webkit {
+namespace npapi {
GtkPluginContainerManager::GtkPluginContainerManager() : host_widget_(NULL) {}
@@ -56,7 +59,7 @@ void GtkPluginContainerManager::DestroyPluginContainer(
}
void GtkPluginContainerManager::MovePluginContainer(
- const webkit_glue::WebPluginGeometry& move) {
+ const WebPluginGeometry& move) {
DCHECK(host_widget_);
GtkWidget *widget = MapIDToWidget(move.window);
if (!widget)
@@ -153,3 +156,6 @@ void GtkPluginContainerManager::RealizeCallback(GtkWidget* widget,
if (id)
gtk_socket_add_id(GTK_SOCKET(widget), id);
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/gtk_plugin_container_manager.h b/webkit/plugins/npapi/gtk_plugin_container_manager.h
index 7f7db8d..c95d2c3 100644
--- a/webkit/glue/plugins/gtk_plugin_container_manager.h
+++ b/webkit/plugins/npapi/gtk_plugin_container_manager.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_GTK_PLUGIN_CONTAINER_MANAGER_H_
-#define WEBKIT_GLUE_PLUGINS_GTK_PLUGIN_CONTAINER_MANAGER_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_GTK_PLUGIN_CONTAINER_MANAGER_H_
+#define WEBKIT_PLUGINS_NPAPI_GTK_PLUGIN_CONTAINER_MANAGER_H_
#include <gtk/gtk.h>
#include <map>
@@ -12,9 +12,10 @@
typedef struct _GtkWidget GtkWidget;
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
+
struct WebPluginGeometry;
-}
// Helper class that creates and manages plugin containers (GtkSocket).
class GtkPluginContainerManager {
@@ -33,7 +34,7 @@ class GtkPluginContainerManager {
// Takes an update from WebKit about a plugin's position and side and moves
// the plugin accordingly.
- void MovePluginContainer(const webkit_glue::WebPluginGeometry& move);
+ void MovePluginContainer(const WebPluginGeometry& move);
private:
// Maps a plugin XID to the corresponding container widget.
@@ -54,4 +55,7 @@ class GtkPluginContainerManager {
PluginWindowToWidgetMap plugin_window_to_widget_map_;
};
-#endif // WEBKIT_GLUE_PLUGINS_GTK_PLUGIN_CONTAINER_MANAGER_H_
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_GTK_PLUGIN_CONTAINER_MANAGER_H_
diff --git a/webkit/glue/plugins/npapi_extension_thunk.cc b/webkit/plugins/npapi/npapi_extension_thunk.cc
index 05a9c5d..ff3e59a 100644
--- a/webkit/glue/plugins/npapi_extension_thunk.cc
+++ b/webkit/plugins/npapi/npapi_extension_thunk.cc
@@ -2,33 +2,36 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/npapi_extension_thunk.h"
+#include "webkit/plugins/npapi/npapi_extension_thunk.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "third_party/npapi/bindings/npapi_extensions.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/webplugin.h"
-#include "webkit/glue/plugins/webplugin_delegate.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
#include "webkit/glue/webkit_glue.h"
+namespace webkit {
+namespace npapi {
+
// FindInstance()
// Finds a PluginInstance from an NPP.
// The caller must take a reference if needed.
-static NPAPI::PluginInstance* FindInstance(NPP id) {
+static PluginInstance* FindInstance(NPP id) {
if (id == NULL) {
NOTREACHED();
return NULL;
}
- return static_cast<NPAPI::PluginInstance*>(id->ndata);
+ return static_cast<PluginInstance*>(id->ndata);
}
// 2D device API ---------------------------------------------------------------
static NPError Device2DQueryCapability(NPP id, int32_t capability,
int32_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
plugin->webplugin()->delegate()->Device2DQueryCapability(capability, value);
return NPERR_NO_ERROR;
@@ -40,7 +43,7 @@ static NPError Device2DQueryCapability(NPP id, int32_t capability,
static NPError Device2DQueryConfig(NPP id,
const NPDeviceConfig* request,
NPDeviceConfig* obtain) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DQueryConfig(
static_cast<const NPDeviceContext2DConfig*>(request),
@@ -52,7 +55,7 @@ static NPError Device2DQueryConfig(NPP id,
static NPError Device2DInitializeContext(NPP id,
const NPDeviceConfig* config,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DInitializeContext(
static_cast<const NPDeviceContext2DConfig*>(config),
@@ -65,7 +68,7 @@ static NPError Device2DSetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t value) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DSetStateContext(
static_cast<NPDeviceContext2D*>(context), state, value);
@@ -77,7 +80,7 @@ static NPError Device2DGetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DGetStateContext(
static_cast<NPDeviceContext2D*>(context), state, value);
@@ -89,7 +92,7 @@ static NPError Device2DFlushContext(NPP id,
NPDeviceContext* context,
NPDeviceFlushContextCallbackPtr callback,
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
NPError err = plugin->webplugin()->delegate()->Device2DFlushContext(
id, static_cast<NPDeviceContext2D*>(context), callback, user_data);
@@ -109,7 +112,7 @@ static NPError Device2DFlushContext(NPP id,
static NPError Device2DDestroyContext(NPP id,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device2DDestroyContext(
static_cast<NPDeviceContext2D*>(context));
@@ -141,7 +144,7 @@ static NPError Device2DMapBuffer(NPP id,
static NPError Device3DQueryCapability(NPP id, int32_t capability,
int32_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
plugin->webplugin()->delegate()->Device3DQueryCapability(capability, value);
return NPERR_NO_ERROR;
@@ -153,7 +156,7 @@ static NPError Device3DQueryCapability(NPP id, int32_t capability,
static NPError Device3DQueryConfig(NPP id,
const NPDeviceConfig* request,
NPDeviceConfig* obtain) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DQueryConfig(
static_cast<const NPDeviceContext3DConfig*>(request),
@@ -165,7 +168,7 @@ static NPError Device3DQueryConfig(NPP id,
static NPError Device3DInitializeContext(NPP id,
const NPDeviceConfig* config,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DInitializeContext(
static_cast<const NPDeviceContext3DConfig*>(config),
@@ -178,7 +181,7 @@ static NPError Device3DSetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t value) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DSetStateContext(
static_cast<NPDeviceContext3D*>(context), state, value);
@@ -190,7 +193,7 @@ static NPError Device3DGetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DGetStateContext(
static_cast<NPDeviceContext3D*>(context), state, value);
@@ -202,7 +205,7 @@ static NPError Device3DFlushContext(NPP id,
NPDeviceContext* context,
NPDeviceFlushContextCallbackPtr callback,
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DFlushContext(
id, static_cast<NPDeviceContext3D*>(context), callback, user_data);
@@ -212,7 +215,7 @@ static NPError Device3DFlushContext(NPP id,
static NPError Device3DDestroyContext(NPP id,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DDestroyContext(
static_cast<NPDeviceContext3D*>(context));
@@ -224,7 +227,7 @@ static NPError Device3DCreateBuffer(NPP id,
NPDeviceContext* context,
size_t size,
int32_t* buffer_id) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DCreateBuffer(
static_cast<NPDeviceContext3D*>(context), size, buffer_id);
@@ -235,7 +238,7 @@ static NPError Device3DCreateBuffer(NPP id,
static NPError Device3DDestroyBuffer(NPP id,
NPDeviceContext* context,
int32_t buffer_id) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DDestroyBuffer(
static_cast<NPDeviceContext3D*>(context), buffer_id);
@@ -247,7 +250,7 @@ static NPError Device3DMapBuffer(NPP id,
NPDeviceContext* context,
int32_t buffer_id,
NPDeviceBuffer* buffer) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DMapBuffer(
static_cast<NPDeviceContext3D*>(context), buffer_id, buffer);
@@ -258,7 +261,7 @@ static NPError Device3DMapBuffer(NPP id,
// Experimental 3D device API --------------------------------------------------
static NPError Device3DGetNumConfigs(NPP id, int32_t* num_configs) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DGetNumConfigs(num_configs);
}
@@ -268,7 +271,7 @@ static NPError Device3DGetNumConfigs(NPP id, int32_t* num_configs) {
static NPError Device3DGetConfigAttribs(NPP id,
int32_t config,
int32_t* attrib_list) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DGetConfigAttribs(
config,
@@ -281,7 +284,7 @@ static NPError Device3DCreateContext(NPP id,
int32_t config,
const int32_t* attrib_list,
NPDeviceContext** context) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DCreateContext(
config,
@@ -299,7 +302,7 @@ static NPError Device3DSynchronizeContext(
int32_t* output_attrib_list,
NPDeviceSynchronizeContextCallbackPtr callback,
void* callback_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DSynchronizeContext(
id,
@@ -319,7 +322,7 @@ static NPError Device3DRegisterCallback(
int32_t callback_type,
NPDeviceGenericCallbackPtr callback,
void* callback_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->Device3DRegisterCallback(
id,
@@ -335,7 +338,7 @@ static NPError Device3DRegisterCallback(
static NPError DeviceAudioQueryCapability(NPP id, int32_t capability,
int32_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
plugin->webplugin()->delegate()->DeviceAudioQueryCapability(capability,
value);
@@ -348,7 +351,7 @@ static NPError DeviceAudioQueryCapability(NPP id, int32_t capability,
static NPError DeviceAudioQueryConfig(NPP id,
const NPDeviceConfig* request,
NPDeviceConfig* obtain) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->DeviceAudioQueryConfig(
static_cast<const NPDeviceContextAudioConfig*>(request),
@@ -360,7 +363,7 @@ static NPError DeviceAudioQueryConfig(NPP id,
static NPError DeviceAudioInitializeContext(NPP id,
const NPDeviceConfig* config,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->DeviceAudioInitializeContext(
static_cast<const NPDeviceContextAudioConfig*>(config),
@@ -373,7 +376,7 @@ static NPError DeviceAudioSetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t value) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
return plugin->webplugin()->delegate()->DeviceAudioSetStateContext(
static_cast<NPDeviceContextAudio*>(context), state, value);
@@ -385,7 +388,7 @@ static NPError DeviceAudioGetStateContext(NPP id,
NPDeviceContext* context,
int32_t state,
intptr_t* value) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
return plugin->webplugin()->delegate()->DeviceAudioGetStateContext(
static_cast<NPDeviceContextAudio*>(context), state, value);
}
@@ -394,14 +397,14 @@ static NPError DeviceAudioFlushContext(NPP id,
NPDeviceContext* context,
NPDeviceFlushContextCallbackPtr callback,
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
return plugin->webplugin()->delegate()->DeviceAudioFlushContext(
id, static_cast<NPDeviceContextAudio*>(context), callback, user_data);
}
static NPError DeviceAudioDestroyContext(NPP id,
NPDeviceContext* context) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
return plugin->webplugin()->delegate()->DeviceAudioDestroyContext(
static_cast<NPDeviceContextAudio*>(context));
}
@@ -477,7 +480,7 @@ static NPError ChooseFile(NPP id,
NPChooseFileMode mode,
NPChooseFileCallback callback,
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NPERR_GENERIC_ERROR;
@@ -490,7 +493,7 @@ static NPError ChooseFile(NPP id,
}
static void NumberOfFindResultsChanged(NPP id, int total, bool final_result) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin) {
plugin->webplugin()->delegate()->NumberOfFindResultsChanged(
total, final_result);
@@ -498,13 +501,13 @@ static void NumberOfFindResultsChanged(NPP id, int total, bool final_result) {
}
static void SelectedFindResultChanged(NPP id, int index) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->webplugin()->delegate()->SelectedFindResultChanged(index);
}
static NPWidgetExtensions* GetWidgetExtensions(NPP id) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NULL;
@@ -512,7 +515,7 @@ static NPWidgetExtensions* GetWidgetExtensions(NPP id) {
}
static NPError NPSetCursor(NPP id, NPCursorType type) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NPERR_GENERIC_ERROR;
@@ -521,15 +524,13 @@ static NPError NPSetCursor(NPP id, NPCursorType type) {
}
static NPFontExtensions* GetFontExtensions(NPP id) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NULL;
return plugin->webplugin()->delegate()->GetFontExtensions();
}
-namespace NPAPI {
-
NPError GetPepperExtensionsFunctions(void* value) {
static const NPNExtensions kExtensions = {
&AcquireDevice,
@@ -548,4 +549,5 @@ NPError GetPepperExtensionsFunctions(void* value) {
return NPERR_NO_ERROR;
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/npapi_extension_thunk.h b/webkit/plugins/npapi/npapi_extension_thunk.h
index fada6bc..683e07e 100644
--- a/webkit/glue/plugins/npapi_extension_thunk.h
+++ b/webkit/plugins/npapi/npapi_extension_thunk.h
@@ -2,22 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_NPAPI_EXTENSION_THUNK_H_
-#define WEBKIT_GLUE_PLUGINS_NPAPI_EXTENSION_THUNK_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_NPAPI_EXTENSION_THUNK_H_
+#define WEBKIT_PLUGINS_NPAPI_NPAPI_EXTENSION_THUNK_H_
#include "third_party/npapi/bindings/npapi_extensions.h"
// This file implements forwarding for the NPAPI "Pepper" extensions through to
// the WebPluginDelegate associated with the plugin.
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
// Implements NPN_GetValue for the case of NPNVPepperExtensions. The function
// pointers in the returned structure implement all the extensions.
NPError GetPepperExtensionsFunctions(void* value);
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGINS_NPAPI_EXTENSION_THUNK_H_
+#endif // WEBKIT_PLUGINS_NPAPI_NPAPI_EXTENSION_THUNK_H_
diff --git a/webkit/plugins/npapi/plugin_constants_win.cc b/webkit/plugins/npapi/plugin_constants_win.cc
new file mode 100644
index 0000000..5a6045c
--- /dev/null
+++ b/webkit/plugins/npapi/plugin_constants_win.cc
@@ -0,0 +1,28 @@
+// Copyright (c) 2006-2009 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.
+
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+
+namespace webkit {
+namespace npapi {
+
+const char16 kNativeWindowClassName[] = L"NativeWindowClass";
+const char16 kWrapperNativeWindowClassName[] = L"WrapperNativeWindowClass";
+const char16 kPaintMessageName[] = L"Chrome_CustomPaintil";
+const char16 kRegistryMozillaPlugins[] = L"SOFTWARE\\MozillaPlugins";
+const char16 kMozillaActiveXPlugin[] = L"npmozax.dll";
+const char16 kNewWMPPlugin[] = L"np-mswmp.dll";
+const char16 kOldWMPPlugin[] = L"npdsplay.dll";
+const char16 kYahooApplicationStatePlugin[] = L"npystate.dll";
+const char16 kWanWangProtocolHandlerPlugin[] = L"npww.dll";
+const char16 kFlashPlugin[] = L"npswf32.dll";
+const char16 kAcrobatReaderPlugin[] = L"nppdf32.dll";
+const char16 kRealPlayerPlugin[] = L"nppl3260.dll";
+const char16 kSilverlightPlugin[] = L"npctrl.dll";
+const char16 kJavaPlugin1[] = L"npjp2.dll";
+const char16 kJavaPlugin2[] = L"npdeploytk.dll";
+const char kGPUPluginMimeType[] = "application/vnd.google.chrome.gpu-plugin";
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/plugins/npapi/plugin_constants_win.h b/webkit/plugins/npapi/plugin_constants_win.h
new file mode 100644
index 0000000..6c39e03
--- /dev/null
+++ b/webkit/plugins/npapi/plugin_constants_win.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2006-2009 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.
+
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_CONSTANTS_WIN_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_CONSTANTS_WIN_H_
+
+#include "base/string16.h"
+
+namespace webkit {
+namespace npapi {
+
+// The window class name for a plugin window.
+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[];
+
+// The name of the custom window message that the browser uses to tell the
+// plugin process to paint a window.
+extern const char16 kPaintMessageName[];
+
+// The name of the registry key which NPAPI plugins update on installation.
+extern const char16 kRegistryMozillaPlugins[];
+
+extern const char16 kMozillaActiveXPlugin[];
+extern const char16 kNewWMPPlugin[];
+extern const char16 kOldWMPPlugin[];
+extern const char16 kYahooApplicationStatePlugin[];
+extern const char16 kWanWangProtocolHandlerPlugin[];
+extern const char16 kFlashPlugin[];
+extern const char16 kAcrobatReaderPlugin[];
+extern const char16 kRealPlayerPlugin[];
+extern const char16 kSilverlightPlugin[];
+extern const char16 kJavaPlugin1[];
+extern const char16 kJavaPlugin2[];
+
+extern const char kGPUPluginMimeType[];
+
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_PLUGIN_LIST_H_
diff --git a/webkit/glue/plugins/plugin_group.cc b/webkit/plugins/npapi/plugin_group.cc
index 548e624..ec1b537 100644
--- a/webkit/glue/plugins/plugin_group.cc
+++ b/webkit/plugins/npapi/plugin_group.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/glue/plugins/plugin_group.h"
+#include "webkit/plugins/npapi/plugin_group.h"
#include "base/linked_ptr.h"
#include "base/string_util.h"
@@ -10,8 +10,11 @@
#include "base/utf_string_conversions.h"
#include "base/values.h"
#include "base/version.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
+
+namespace webkit {
+namespace npapi {
const char* PluginGroup::kAdobeReaderGroupName = "Adobe Reader";
@@ -46,7 +49,7 @@ bool PluginGroup::IsPluginNameDisabledByPolicy(const string16& plugin_name) {
/*static*/
bool PluginGroup::IsPluginPathDisabledByPolicy(const FilePath& plugin_path) {
std::vector<WebPluginInfo> plugins;
- NPAPI::PluginList::Singleton()->GetPlugins(false, &plugins);
+ PluginList::Singleton()->GetPlugins(false, &plugins);
for (std::vector<WebPluginInfo>::const_iterator it = plugins.begin();
it != plugins.end();
++it) {
@@ -381,7 +384,7 @@ void PluginGroup::DisableOutdatedPlugins() {
for (size_t i = 0; i < version_ranges_.size(); ++i) {
if (IsPluginOutdated(*version, version_ranges_[i])) {
it->enabled = false;
- NPAPI::PluginList::Singleton()->DisablePlugin(it->path);
+ PluginList::Singleton()->DisablePlugin(it->path);
}
}
}
@@ -395,13 +398,16 @@ void PluginGroup::Enable(bool enable) {
web_plugin_infos_.begin();
it != web_plugin_infos_.end(); ++it) {
if (enable && !IsPluginNameDisabledByPolicy(it->name)) {
- NPAPI::PluginList::Singleton()->EnablePlugin(it->path);
+ PluginList::Singleton()->EnablePlugin(it->path);
it->enabled = true;
enabled_plugin_exists = true;
} else {
it->enabled = false;
- NPAPI::PluginList::Singleton()->DisablePlugin(it->path);
+ PluginList::Singleton()->DisablePlugin(it->path);
}
}
enabled_ = enabled_plugin_exists;
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_group.h b/webkit/plugins/npapi/plugin_group.h
index 5098787..ae093ab 100644
--- a/webkit/glue/plugins/plugin_group.h
+++ b/webkit/plugins/npapi/plugin_group.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_
-#define WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_
#pragma once
#include <map>
@@ -17,12 +17,15 @@
class DictionaryValue;
class FilePath;
+class TableModelArrayControllerTest;
+class PluginExceptionsTableModelTest;
class Version;
-struct WebPluginInfo;
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
+
class PluginList;
-};
+struct WebPluginInfo;
// Hard-coded version ranges for plugin groups.
struct VersionRangeDefinition {
@@ -143,10 +146,10 @@ class PluginGroup {
private:
typedef std::map<std::string, PluginGroup*> PluginMap;
- friend class NPAPI::PluginList;
+ friend class PluginList;
friend class PluginGroupTest;
- friend class TableModelArrayControllerTest;
- friend class PluginExceptionsTableModelTest;
+ friend class ::TableModelArrayControllerTest;
+ friend class ::PluginExceptionsTableModelTest;
// Generates the (short) identifier string for the given plugin.
static std::string GetIdentifier(const WebPluginInfo& wpi);
@@ -202,4 +205,7 @@ class PluginGroup {
std::vector<int> web_plugin_positions_;
};
-#endif // WEBKIT_GLUE_PLUGINS_PLUGIN_GROUP_H_
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_GROUP_H_
diff --git a/webkit/glue/plugins/plugin_group_unittest.cc b/webkit/plugins/npapi/plugin_group_unittest.cc
index 31dee1e..e82dc5a 100644
--- a/webkit/glue/plugins/plugin_group_unittest.cc
+++ b/webkit/plugins/npapi/plugin_group_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/glue/plugins/plugin_group.h"
+#include "webkit/plugins/npapi/plugin_group.h"
#include <string>
#include <vector>
@@ -13,8 +13,11 @@
#include "base/values.h"
#include "base/version.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/plugins/webplugininfo.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+
+namespace webkit {
+namespace npapi {
static const VersionRangeDefinition kPluginVersionRange[] = {
{ "", "", "3.0.44" }
@@ -159,10 +162,8 @@ TEST(PluginGroupTest, PluginGroupDescription) {
TEST(PluginGroupTest, PluginGroupDefinition) {
const PluginGroupDefinition* definitions =
- NPAPI::PluginList::GetPluginGroupDefinitions();
- for (size_t i = 0;
- i < NPAPI::PluginList::GetPluginGroupDefinitionsSize();
- ++i) {
+ PluginList::GetPluginGroupDefinitions();
+ for (size_t i = 0; i < PluginList::GetPluginGroupDefinitionsSize(); ++i) {
scoped_ptr<PluginGroup> def_group(
PluginGroupTest::CreatePluginGroup(definitions[i]));
ASSERT_TRUE(def_group.get() != NULL);
@@ -222,3 +223,6 @@ TEST(PluginGroupTest, DisabledByPolicy) {
EXPECT_TRUE(PluginGroup::IsPluginNameDisabledByPolicy(
ASCIIToUTF16("Google Earth")));
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/plugins/npapi/plugin_host.cc
index 28aba02..1fd542f 100644
--- a/webkit/glue/plugins/plugin_host.cc
+++ b/webkit/plugins/npapi/plugin_host.cc
@@ -2,42 +2,47 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/plugin_host.h"
+#include "webkit/plugins/npapi/plugin_host.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/string_piece.h"
#include "base/string_util.h"
-#if defined(OS_MACOSX)
-#include "base/sys_info.h"
-#endif
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
+#include "build/build_config.h"
#include "net/base/net_util.h"
#include "third_party/npapi/bindings/npapi_extensions.h"
#include "third_party/npapi/bindings/npruntime.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBindings.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/default_plugin_shared.h"
-#include "webkit/glue/plugins/npapi_extension_thunk.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_lib.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/plugin_stream_url.h"
-#include "webkit/glue/plugins/webplugin_delegate.h"
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/default_plugin_shared.h"
+#include "webkit/plugins/npapi/npapi_extension_thunk.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_stream_url.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
+
+#if defined(OS_MACOSX)
+#include "base/sys_info.h"
+#endif
using WebKit::WebBindings;
+namespace webkit {
+namespace npapi {
+
// Finds a PluginInstance from an NPP.
// The caller must take a reference if needed.
-static NPAPI::PluginInstance* FindInstance(NPP id) {
+static PluginInstance* FindInstance(NPP id) {
if (id == NULL) {
return NULL;
}
- return reinterpret_cast<NPAPI::PluginInstance*>(id->ndata);
+ return reinterpret_cast<PluginInstance*>(id->ndata);
}
#if defined(OS_MACOSX)
@@ -50,8 +55,6 @@ static bool SupportsSharingAcceleratedSurfaces() {
}
#endif
-namespace NPAPI {
-
scoped_refptr<PluginHost> PluginHost::singleton_;
PluginHost::PluginHost() {
@@ -277,13 +280,19 @@ bool PluginHost::SetPostData(const char* buf,
return !err;
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
extern "C" {
+using webkit::npapi::FindInstance;
+using webkit::npapi::PluginHost;
+using webkit::npapi::PluginInstance;
+using webkit::npapi::WebPlugin;
+
// Allocates memory from the host's memory space.
void* NPN_MemAlloc(uint32_t size) {
- scoped_refptr<NPAPI::PluginHost> host(NPAPI::PluginHost::Singleton());
+ scoped_refptr<PluginHost> host(PluginHost::Singleton());
if (host != NULL) {
// Note: We must use the same allocator/deallocator
// that is used by the javascript library, as some of the
@@ -296,7 +305,7 @@ void* NPN_MemAlloc(uint32_t size) {
// Deallocates memory from the host's memory space
void NPN_MemFree(void* ptr) {
- scoped_refptr<NPAPI::PluginHost> host(NPAPI::PluginHost::Singleton());
+ scoped_refptr<PluginHost> host(PluginHost::Singleton());
if (host != NULL) {
if (ptr != NULL && ptr != reinterpret_cast<void*>(-1))
free(ptr);
@@ -320,8 +329,8 @@ NPError NPN_RequestRead(NPStream* stream, NPByteRange* range_list) {
if (!stream || !range_list)
return NPERR_GENERIC_ERROR;
- scoped_refptr<NPAPI::PluginInstance> plugin(
- reinterpret_cast<NPAPI::PluginInstance*>(stream->ndata));
+ scoped_refptr<PluginInstance> plugin(
+ reinterpret_cast<PluginInstance*>(stream->ndata));
if (!plugin.get())
return NPERR_GENERIC_ERROR;
@@ -338,7 +347,7 @@ static NPError GetURLNotify(NPP id,
if (!url)
return NPERR_INVALID_URL;
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (!plugin.get()) {
return NPERR_GENERIC_ERROR;
}
@@ -402,7 +411,7 @@ static NPError PostURLNotify(NPP id,
if (!url)
return NPERR_INVALID_URL;
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (!plugin.get()) {
NOTREACHED();
return NPERR_GENERIC_ERROR;
@@ -549,7 +558,7 @@ NPError NPN_DestroyStream(NPP id, NPStream* stream, NPReason reason) {
//
//
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin.get() == NULL) {
NOTREACHED();
return NPERR_GENERIC_ERROR;
@@ -565,7 +574,7 @@ const char* NPN_UserAgent(NPP id) {
// else Flash won't request windowless mode.
bool use_mozilla_user_agent = true;
if (id) {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<PluginInstance> plugin = FindInstance(id);
if (plugin.get() && !plugin->use_mozilla_user_agent())
use_mozilla_user_agent = false;
}
@@ -575,11 +584,12 @@ const char* NPN_UserAgent(NPP id) {
"Gecko/20061103 Firefox/2.0a1";
#elif defined(OS_MACOSX)
// Silverlight 4 doesn't handle events correctly unless we claim to be Safari.
- scoped_refptr<NPAPI::PluginInstance> plugin;
+ scoped_refptr<PluginInstance> plugin;
if (id)
plugin = FindInstance(id);
if (plugin.get()) {
- WebPluginInfo plugin_info = plugin->plugin_lib()->plugin_info();
+ webkit::npapi::WebPluginInfo plugin_info =
+ plugin->plugin_lib()->plugin_info();
if (plugin_info.name == ASCIIToUTF16("Silverlight Plug-In") &&
StartsWith(plugin_info.version, ASCIIToUTF16("4."), false)) {
return "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) "
@@ -611,7 +621,7 @@ void NPN_InvalidateRect(NPP id, NPRect *invalidRect) {
// plug-ins at regularly timed intervals. To force a paint message, the
// plug-in can call NPN_ForceRedraw after calling this method.
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin.get() && plugin->webplugin()) {
if (invalidRect) {
#if defined(OS_WIN)
@@ -644,7 +654,7 @@ void NPN_InvalidateRegion(NPP id, NPRegion invalidRegion) {
// TODO: this is overkill--add platform-specific region handling (at the
// very least, fetch the region's bounding box and pass it to InvalidateRect).
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
DCHECK(plugin.get() != NULL);
if (plugin.get() && plugin->webplugin())
plugin->webplugin()->Invalidate();
@@ -673,7 +683,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
switch (static_cast<int>(variable)) {
case NPNVWindowNPObject: {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
NPObject *np_object = plugin->webplugin()->GetWindowScriptNPObject();
// Return value is expected to be retained, as
// described here:
@@ -689,7 +699,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
break;
}
case NPNVPluginElementNPObject: {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
NPObject *np_object = plugin->webplugin()->GetPluginElement();
// Return value is expected to be retained, as
// described here:
@@ -706,7 +716,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
}
#if !defined(OS_MACOSX) // OS X doesn't have windowed plugins.
case NPNVnetscapeWindow: {
- scoped_refptr<NPAPI::PluginInstance> plugin = FindInstance(id);
+ scoped_refptr<PluginInstance> plugin = FindInstance(id);
if (!plugin.get()) {
NOTREACHED();
return NPERR_GENERIC_ERROR;
@@ -743,33 +753,33 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
}
case NPNVprivateModeBool: {
NPBool* private_mode = reinterpret_cast<NPBool*>(value);
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
*private_mode = plugin->webplugin()->IsOffTheRecord();
rv = NPERR_NO_ERROR;
break;
}
- case default_plugin::kMissingPluginStatusStart +
- default_plugin::MISSING_PLUGIN_AVAILABLE:
+ case webkit::npapi::default_plugin::kMissingPluginStatusStart +
+ webkit::npapi::default_plugin::MISSING_PLUGIN_AVAILABLE:
// fall through
- case default_plugin::kMissingPluginStatusStart +
- default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: {
+ case webkit::npapi::default_plugin::kMissingPluginStatusStart +
+ webkit::npapi::default_plugin::MISSING_PLUGIN_USER_STARTED_DOWNLOAD: {
// This is a hack for the default plugin to send notification to
// renderer. Even though we check if the plugin is the default plugin,
// we still need to worry about future standard change that may conflict
// with the variable definition, in order to avoid duplicate case clauses
// in this big switch statement.
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin->plugin_lib()->plugin_info().path.value() ==
- kDefaultPluginLibraryName) {
- plugin->webplugin()->OnMissingPluginStatus(
- variable - default_plugin::kMissingPluginStatusStart);
+ webkit::npapi::kDefaultPluginLibraryName) {
+ plugin->webplugin()->OnMissingPluginStatus(variable -
+ webkit::npapi::default_plugin::kMissingPluginStatusStart);
}
break;
}
#if defined(OS_MACOSX)
case NPNVpluginDrawingModel: {
// return the drawing model that was negotiated when we initialized.
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
*reinterpret_cast<int*>(value) = plugin->drawing_model();
rv = NPERR_NO_ERROR;
break;
@@ -802,7 +812,8 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
// TODO(stuartmorgan): Once existing CA plugins have implemented the
// invalidating version, remove support for this one.
NPBool* supports_model = reinterpret_cast<NPBool*>(value);
- *supports_model = SupportsSharingAcceleratedSurfaces() ? true : false;
+ *supports_model = webkit::npapi::SupportsSharingAcceleratedSurfaces() ?
+ true : false;
rv = NPERR_NO_ERROR;
break;
}
@@ -826,7 +837,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
// If the plugin is not started in a Pepper implementation, it
// will likely fail when it tries to use any of the functions
// attached to the extension vector.
- rv = NPAPI::GetPepperExtensionsFunctions(value);
+ rv = webkit::npapi::GetPepperExtensionsFunctions(value);
break;
default:
DVLOG(1) << "NPN_GetValue(" << variable << ") is not implemented yet.";
@@ -838,7 +849,7 @@ NPError NPN_GetValue(NPP id, NPNVariable variable, void* value) {
NPError NPN_SetValue(NPP id, NPPVariable variable, void* value) {
// Allows the plugin to set various modes
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
switch(variable) {
case NPPVpluginWindowBool: {
// Sets windowless mode for display of the plugin
@@ -879,7 +890,7 @@ NPError NPN_SetValue(NPP id, NPPVariable variable, void* value) {
if (model == NPDrawingModelCoreGraphics ||
model == NPDrawingModelInvalidatingCoreAnimation ||
(model == NPDrawingModelCoreAnimation &&
- SupportsSharingAcceleratedSurfaces())) {
+ webkit::npapi::SupportsSharingAcceleratedSurfaces())) {
plugin->set_drawing_model(static_cast<NPDrawingModel>(model));
return NPERR_NO_ERROR;
}
@@ -923,13 +934,13 @@ void* NPN_GetJavaPeer(NPP) {
}
void NPN_PushPopupsEnabledState(NPP id, NPBool enabled) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->PushPopupsEnabledState(enabled ? true : false);
}
void NPN_PopPopupsEnabledState(NPP id) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->PopPopupsEnabledState();
}
@@ -937,7 +948,7 @@ void NPN_PopPopupsEnabledState(NPP id) {
void NPN_PluginThreadAsyncCall(NPP id,
void (*func)(void*),
void* user_data) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->PluginThreadAsyncCall(func, user_data);
}
@@ -965,11 +976,11 @@ NPError NPN_GetValueForURL(NPP id,
break;
}
case NPNURLVCookie: {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NPERR_GENERIC_ERROR;
- webkit_glue::WebPlugin* webplugin = plugin->webplugin();
+ WebPlugin* webplugin = plugin->webplugin();
if (!webplugin)
return NPERR_GENERIC_ERROR;
@@ -1005,11 +1016,11 @@ NPError NPN_SetValueForURL(NPP id,
switch (variable) {
case NPNURLVCookie: {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (!plugin)
return NPERR_GENERIC_ERROR;
- webkit_glue::WebPlugin* webplugin = plugin->webplugin();
+ WebPlugin* webplugin = plugin->webplugin();
if (!webplugin)
return NPERR_GENERIC_ERROR;
@@ -1051,7 +1062,7 @@ uint32_t NPN_ScheduleTimer(NPP id,
uint32_t interval,
NPBool repeat,
void (*func)(NPP id, uint32_t timer_id)) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (!plugin)
return 0;
@@ -1059,7 +1070,7 @@ uint32_t NPN_ScheduleTimer(NPP id,
}
void NPN_UnscheduleTimer(NPP id, uint32_t timer_id) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin)
plugin->UnscheduleTimer(timer_id);
}
@@ -1068,7 +1079,7 @@ NPError NPN_PopUpContextMenu(NPP id, NPMenu* menu) {
if (!menu)
return NPERR_INVALID_PARAM;
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin.get()) {
return plugin->PopUpContextMenu(menu);
}
@@ -1080,7 +1091,7 @@ NPBool NPN_ConvertPoint(NPP id, double sourceX, double sourceY,
NPCoordinateSpace sourceSpace,
double *destX, double *destY,
NPCoordinateSpace destSpace) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(id));
+ scoped_refptr<PluginInstance> plugin(FindInstance(id));
if (plugin.get()) {
return plugin->ConvertPoint(sourceX, sourceY, sourceSpace,
destX, destY, destSpace);
@@ -1102,7 +1113,7 @@ NPBool NPN_UnfocusInstance(NPP id, NPFocusDirection direction) {
}
void NPN_URLRedirectResponse(NPP instance, void* notify_data, NPBool allow) {
- scoped_refptr<NPAPI::PluginInstance> plugin(FindInstance(instance));
+ scoped_refptr<PluginInstance> plugin(FindInstance(instance));
if (plugin.get()) {
plugin->URLRedirectResponse(!!allow, notify_data);
}
diff --git a/webkit/glue/plugins/plugin_host.h b/webkit/plugins/npapi/plugin_host.h
index 4763df1..f6359c5 100644
--- a/webkit/glue/plugins/plugin_host.h
+++ b/webkit/plugins/npapi/plugin_host.h
@@ -4,8 +4,8 @@
// TODO: Need mechanism to cleanup the static instance
-#ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_HOST_H__
-#define WEBKIT_GLUE_PLUGIN_PLUGIN_HOST_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_HOST_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_HOST_H_
#include <string>
#include <vector>
@@ -14,8 +14,9 @@
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/nphostapi.h"
-namespace NPAPI
-{
+namespace webkit {
+namespace npapi {
+
class PluginInstance;
// The Plugin Host implements the NPN_xxx functions for NPAPI plugins.
@@ -58,6 +59,7 @@ class PluginHost : public base::RefCounted<PluginHost> {
DISALLOW_COPY_AND_ASSIGN(PluginHost);
};
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGIN_PLUGIN_HOST_H__
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_HOST_H_
diff --git a/webkit/glue/plugins/plugin_instance.cc b/webkit/plugins/npapi/plugin_instance.cc
index 4ccbadf..6f65456 100644
--- a/webkit/glue/plugins/plugin_instance.cc
+++ b/webkit/plugins/npapi/plugin_instance.cc
@@ -2,28 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "build/build_config.h"
-
-#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "build/build_config.h"
#include "base/file_util.h"
#include "base/message_loop.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/plugin_host.h"
-#include "webkit/glue/plugins/plugin_lib.h"
-#include "webkit/glue/plugins/plugin_stream_url.h"
-#include "webkit/glue/plugins/plugin_string_stream.h"
-#include "webkit/glue/plugins/webplugin.h"
-#include "webkit/glue/plugins/webplugin_delegate.h"
+#include "webkit/plugins/npapi/plugin_host.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_stream_url.h"
+#include "webkit/plugins/npapi/plugin_string_stream.h"
+#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
#include "net/base/escape.h"
#if defined(OS_MACOSX)
#include <ApplicationServices/ApplicationServices.h>
#endif
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
PluginInstance::PluginInstance(PluginLib *plugin, const std::string &mime_type)
: plugin_(plugin),
@@ -130,7 +130,7 @@ void PluginInstance::CloseStreams() {
in_close_streams_ = false;
}
-webkit_glue::WebPluginResourceClient* PluginInstance::GetRangeRequest(
+WebPluginResourceClient* PluginInstance::GetRangeRequest(
int id) {
PendingRangeRequestMap::iterator iter = pending_range_requests_.find(id);
if (iter == pending_range_requests_.end()) {
@@ -138,7 +138,7 @@ webkit_glue::WebPluginResourceClient* PluginInstance::GetRangeRequest(
return NULL;
}
- webkit_glue::WebPluginResourceClient* rv = iter->second->AsResourceClient();
+ WebPluginResourceClient* rv = iter->second->AsResourceClient();
pending_range_requests_.erase(iter);
return rv;
}
@@ -665,7 +665,7 @@ void PluginInstance::URLRedirectResponse(bool allow, void* notify_data) {
stream_index != open_streams_.end(); ++stream_index) {
PluginStream* plugin_stream = *stream_index;
if (plugin_stream->notify_data() == notify_data) {
- webkit_glue::WebPluginResourceClient* resource_client =
+ WebPluginResourceClient* resource_client =
plugin_stream->AsResourceClient();
webplugin_->URLRedirectResponse(allow, resource_client->ResourceId());
if (allow) {
@@ -677,4 +677,5 @@ void PluginInstance::URLRedirectResponse(bool allow, void* notify_data) {
}
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_instance.h b/webkit/plugins/npapi/plugin_instance.h
index fa0320e..98a5838 100644
--- a/webkit/glue/plugins/plugin_instance.h
+++ b/webkit/plugins/npapi/plugin_instance.h
@@ -5,8 +5,8 @@
// TODO: Need to deal with NPAPI's NPSavedData.
// I haven't seen plugins use it yet.
-#ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__
-#define WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_
#include <map>
#include <stack>
@@ -26,18 +26,17 @@
class MessageLoop;
-namespace webkit_glue {
-class WebPlugin;
-class WebPluginResourceClient;
-}
+namespace webkit {
+namespace npapi {
-namespace NPAPI
-{
class PluginLib;
class PluginHost;
class PluginStream;
class PluginStreamUrl;
class PluginDataStream;
+class WebPlugin;
+class WebPluginResourceClient;
+
#if defined(OS_MACOSX)
class ScopedCurrentPluginEvent;
#endif
@@ -96,15 +95,15 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
void set_transparent(bool value) { transparent_ = value; }
// Get/Set the WebPlugin associated with this instance
- webkit_glue::WebPlugin* webplugin() { return webplugin_; }
- void set_web_plugin(webkit_glue::WebPlugin* webplugin) {
+ WebPlugin* webplugin() { return webplugin_; }
+ void set_web_plugin(WebPlugin* webplugin) {
webplugin_ = webplugin;
}
// Get the mimeType for this plugin stream
const std::string &mime_type() { return mime_type_; }
- NPAPI::PluginLib* plugin_lib() { return plugin_; }
+ PluginLib* plugin_lib() { return plugin_; }
#if defined(OS_MACOSX)
// Get/Set the Mac NPAPI drawing and event models
@@ -148,7 +147,7 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
// Returns the WebPluginResourceClient object for a stream that has become
// seekable.
- webkit_glue::WebPluginResourceClient* GetRangeRequest(int id);
+ WebPluginResourceClient* GetRangeRequest(int id);
// Have the plugin create it's script object.
NPObject *GetPluginScriptableObject();
@@ -284,7 +283,7 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
// the possiblity of conforming to it (http://b/issue?id=936667). We
// could also log a bug with Real, which would save the effort.
uint8 zero_padding_[96];
- scoped_refptr<NPAPI::PluginLib> plugin_;
+ scoped_refptr<PluginLib> plugin_;
NPP npp_;
scoped_refptr<PluginHost> host_;
NPPluginFuncs* npp_functions_;
@@ -292,7 +291,7 @@ class PluginInstance : public base::RefCountedThreadSafe<PluginInstance> {
gfx::PluginWindowHandle window_handle_;
bool windowless_;
bool transparent_;
- webkit_glue::WebPlugin* webplugin_;
+ WebPlugin* webplugin_;
std::string mime_type_;
GURL get_url_;
intptr_t get_notify_data_;
@@ -370,6 +369,7 @@ class ScopedCurrentPluginEvent {
};
#endif
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGIN_PLUGIN_INSTANCE_H__
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_INSTANCE_H_
diff --git a/webkit/glue/plugins/plugin_instance_mac.mm b/webkit/plugins/npapi/plugin_instance_mac.mm
index 9800198..bbcef8a 100644
--- a/webkit/glue/plugins/plugin_instance_mac.mm
+++ b/webkit/plugins/npapi/plugin_instance_mac.mm
@@ -2,12 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "build/build_config.h"
-
#import <AppKit/AppKit.h>
#include "base/logging.h"
-#include "webkit/glue/plugins/plugin_instance.h"
+#include "build/build_config.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
// When C++ exceptions are disabled, the C++ library defines |try| and
// |catch| so as to allow exception-expecting C++ code to build properly when
@@ -26,6 +25,9 @@
@end
#endif
+namespace webkit {
+namespace npapi {
+
namespace {
// Returns an autoreleased NSEvent constructed from the given np_event,
@@ -76,8 +78,6 @@ NSEvent* NSEventForNPCocoaEvent(NPCocoaEvent* np_event, NSWindow* window) {
} // namespace
-namespace NPAPI {
-
NPError PluginInstance::PopUpContextMenu(NPMenu* menu) {
if (!currently_handled_event_)
return NPERR_GENERIC_ERROR;
@@ -130,4 +130,5 @@ NPError PluginInstance::PopUpContextMenu(NPMenu* menu) {
return return_val;
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_lib.cc b/webkit/plugins/npapi/plugin_lib.cc
index 4ae4da4..d801ee0 100644
--- a/webkit/glue/plugins/plugin_lib.cc
+++ b/webkit/plugins/npapi/plugin_lib.cc
@@ -2,18 +2,19 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/metrics/stats_counters.h"
#include "base/string_util.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_host.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_host.h"
+#include "webkit/plugins/npapi/plugin_list.h"
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
const char kPluginLibrariesLoadedCounter[] = "PluginLibrariesLoaded";
const char kPluginInstancesActiveCounter[] = "PluginInstancesActive";
@@ -346,4 +347,5 @@ void PluginLib::Shutdown() {
}
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_lib.h b/webkit/plugins/npapi/plugin_lib.h
index ca46e41..081e593 100644
--- a/webkit/glue/plugins/plugin_lib.h
+++ b/webkit/plugins/npapi/plugin_lib.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_PLUGIN_LIB_H_
-#define WEBKIT_GLUE_PLUGINS_PLUGIN_LIB_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_LIB_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_LIB_H_
#include <string>
#include <vector>
@@ -12,13 +12,14 @@
#include "base/native_library.h"
#include "base/ref_counted.h"
#include "build/build_config.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugin.h"
class FilePath;
struct WebPluginInfo;
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
class PluginInstance;
@@ -115,6 +116,7 @@ class PluginLib : public base::RefCounted<PluginLib> {
DISALLOW_COPY_AND_ASSIGN(PluginLib);
};
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGINS_PLUGIN_LIB_H_
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIB_H_
diff --git a/webkit/glue/plugins/plugin_lib_mac.mm b/webkit/plugins/npapi/plugin_lib_mac.mm
index 89444c8..6e3a22a 100644
--- a/webkit/glue/plugins/plugin_lib_mac.mm
+++ b/webkit/plugins/npapi/plugin_lib_mac.mm
@@ -4,7 +4,7 @@
#import <Carbon/Carbon.h>
-#include "webkit/glue/plugins/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/native_library.h"
@@ -13,18 +13,19 @@
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
-#include "webkit/glue/plugins/plugin_list.h"
-
-static const short kSTRTypeDefinitionResourceID = 128;
-static const short kSTRTypeDescriptionResourceID = 127;
-static const short kSTRPluginDescriptionResourceID = 126;
+#include "webkit/plugins/npapi/plugin_list.h"
using base::mac::ScopedCFTypeRef;
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
namespace {
+const short kSTRTypeDefinitionResourceID = 128;
+const short kSTRTypeDescriptionResourceID = 127;
+const short kSTRPluginDescriptionResourceID = 126;
+
NSDictionary* GetMIMETypes(CFBundleRef bundle) {
NSString* mime_filename =
(NSString*)CFBundleGetValueForInfoDictionaryKey(bundle,
@@ -345,4 +346,5 @@ bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
return false;
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_lib_posix.cc b/webkit/plugins/npapi/plugin_lib_posix.cc
index ac937e1..19fa141 100644
--- a/webkit/glue/plugins/plugin_lib_posix.cc
+++ b/webkit/plugins/npapi/plugin_lib_posix.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/glue/plugins/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
#include <dlfcn.h>
#if defined(OS_OPENBSD)
@@ -21,15 +21,16 @@
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
// These headers must be included in this order to make the declaration gods
// happy.
#include "base/third_party/nspr/prcpucfg_linux.h"
-namespace {
+namespace webkit {
+namespace npapi {
-using NPAPI::PluginList;
+namespace {
// Copied from nsplugindefs.h instead of including the file since it has a bunch
// of dependencies.
@@ -134,9 +135,7 @@ void UnwrapNSPluginWrapper(void **dl, FilePath* unwrapped_path) {
*unwrapped_path = path;
}
-} // anonymous namespace
-
-namespace NPAPI {
+} // namespace
bool PluginLib::ReadWebPluginInfo(const FilePath& filename,
WebPluginInfo* info) {
@@ -253,4 +252,6 @@ void PluginLib::ParseMIMEDescription(
}
}
-} // namespace NPAPI
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_lib_unittest.cc b/webkit/plugins/npapi/plugin_lib_unittest.cc
index 45c4bb6..1794da90 100644
--- a/webkit/glue/plugins/plugin_lib_unittest.cc
+++ b/webkit/plugins/npapi/plugin_lib_unittest.cc
@@ -2,21 +2,24 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace webkit {
+namespace npapi {
+
// Test the unloading of plugin libs. Bug http://crbug.com/46526 showed that
// if UnloadAllPlugins() simply iterates through the g_loaded_libs global
// variable, we can get a crash if no plugin libs were marked as always loaded.
-class PluginLibTest : public NPAPI::PluginLib {
+class PluginLibTest : public PluginLib {
public:
- PluginLibTest() : NPAPI::PluginLib(WebPluginInfo(), NULL) {
+ PluginLibTest() : PluginLib(WebPluginInfo(), NULL) {
}
- using NPAPI::PluginLib::Unload;
+ using PluginLib::Unload;
};
TEST(PluginLibLoading, UnloadAllPlugins) {
@@ -26,7 +29,7 @@ TEST(PluginLibLoading, UnloadAllPlugins) {
// Try with a single plugin lib.
scoped_refptr<PluginLibTest> plugin_lib1(new PluginLibTest());
- NPAPI::PluginLib::UnloadAllPlugins();
+ PluginLib::UnloadAllPlugins();
// Need to create it again, it should have been destroyed above.
ASSERT_EQ(static_cast<PluginLibTest*>(NULL),
@@ -35,7 +38,7 @@ TEST(PluginLibLoading, UnloadAllPlugins) {
// Try with two plugin libs.
plugin_lib1 = new PluginLibTest();
scoped_refptr<PluginLibTest> plugin_lib2(new PluginLibTest());
- NPAPI::PluginLib::UnloadAllPlugins();
+ PluginLib::UnloadAllPlugins();
// Need to create it again, it should have been destroyed above.
ASSERT_EQ(static_cast<PluginLibTest*>(NULL),
@@ -45,7 +48,7 @@ TEST(PluginLibLoading, UnloadAllPlugins) {
plugin_lib1 = new PluginLibTest();
plugin_lib2 = new PluginLibTest();
plugin_lib1->Unload();
- NPAPI::PluginLib::UnloadAllPlugins();
+ PluginLib::UnloadAllPlugins();
// Need to create it again, it should have been destroyed above.
ASSERT_EQ(static_cast<PluginLibTest*>(NULL),
@@ -54,7 +57,7 @@ TEST(PluginLibLoading, UnloadAllPlugins) {
// Now try to manually Unload the only one and then UnloadAll.
plugin_lib1 = new PluginLibTest();
plugin_lib1->Unload();
- NPAPI::PluginLib::UnloadAllPlugins();
+ PluginLib::UnloadAllPlugins();
}
#if defined(OS_LINUX)
@@ -62,7 +65,7 @@ TEST(PluginLibLoading, UnloadAllPlugins) {
// Test parsing a simple description: Real Audio.
TEST(MIMEDescriptionParse, Simple) {
std::vector<WebPluginMimeType> types;
- NPAPI::PluginLib::ParseMIMEDescription(
+ PluginLib::ParseMIMEDescription(
"audio/x-pn-realaudio-plugin:rpm:RealAudio document;",
&types);
ASSERT_EQ(1U, types.size());
@@ -76,7 +79,7 @@ TEST(MIMEDescriptionParse, Simple) {
// Test parsing a multi-entry description: QuickTime as provided by Totem.
TEST(MIMEDescriptionParse, Multi) {
std::vector<WebPluginMimeType> types;
- NPAPI::PluginLib::ParseMIMEDescription(
+ PluginLib::ParseMIMEDescription(
"video/quicktime:mov:QuickTime video;video/mp4:mp4:MPEG-4 "
"video;image/x-macpaint:pntg:MacPaint Bitmap image;image/x"
"-quicktime:pict, pict1, pict2:QuickTime image;video/x-m4v"
@@ -98,7 +101,7 @@ TEST(MIMEDescriptionParse, Multi) {
// This comes from loading Totem with LANG=ja_JP.UTF-8.
TEST(MIMEDescriptionParse, JapaneseUTF8) {
std::vector<WebPluginMimeType> types;
- NPAPI::PluginLib::ParseMIMEDescription(
+ PluginLib::ParseMIMEDescription(
"audio/x-ogg:ogg:Ogg \xe3\x82\xaa\xe3\x83\xbc\xe3\x83\x87"
"\xe3\x82\xa3\xe3\x83\xaa",
&types);
@@ -111,11 +114,11 @@ TEST(MIMEDescriptionParse, JapaneseUTF8) {
// Test that we handle corner cases gracefully.
TEST(MIMEDescriptionParse, CornerCases) {
std::vector<WebPluginMimeType> types;
- NPAPI::PluginLib::ParseMIMEDescription("mime/type:", &types);
+ PluginLib::ParseMIMEDescription("mime/type:", &types);
EXPECT_TRUE(types.empty());
types.clear();
- NPAPI::PluginLib::ParseMIMEDescription("mime/type:ext1:", &types);
+ PluginLib::ParseMIMEDescription("mime/type:ext1:", &types);
ASSERT_EQ(1U, types.size());
EXPECT_EQ("mime/type", types[0].mime_type);
EXPECT_EQ(1U, types[0].file_extensions.size());
@@ -126,7 +129,7 @@ TEST(MIMEDescriptionParse, CornerCases) {
// This Java plugin has embedded semicolons in the mime type.
TEST(MIMEDescriptionParse, ComplicatedJava) {
std::vector<WebPluginMimeType> types;
- NPAPI::PluginLib::ParseMIMEDescription(
+ PluginLib::ParseMIMEDescription(
"application/x-java-vm:class,jar:IcedTea;application/x-java"
"-applet:class,jar:IcedTea;application/x-java-applet;versio"
"n=1.1:class,jar:IcedTea;application/x-java-applet;version="
@@ -150,3 +153,6 @@ TEST(MIMEDescriptionParse, ComplicatedJava) {
}
#endif // defined(OS_LINUX)
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_lib_win.cc b/webkit/plugins/npapi/plugin_lib_win.cc
index 382c2c8..6132d45 100644
--- a/webkit/glue/plugins/plugin_lib_win.cc
+++ b/webkit/plugins/npapi/plugin_lib_win.cc
@@ -2,16 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
#include "base/file_version_info.h"
#include "base/file_version_info_win.h"
#include "base/logging.h"
#include "base/path_service.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_list.h"
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
WebPluginInfo* info) {
@@ -43,4 +44,5 @@ bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
return PluginList::CreateWebPluginInfo(pvi, info);
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc
index a2b4cf5..a92373e 100644
--- a/webkit/glue/plugins/plugin_list.cc
+++ b/webkit/plugins/npapi/plugin_list.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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
#include <algorithm>
@@ -15,9 +15,9 @@
#include "base/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "net/base/mime_util.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/plugin_lib.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
#include "webkit/plugins/plugin_switches.h"
#if defined(OS_POSIX)
@@ -25,7 +25,11 @@
#include "base/third_party/valgrind/valgrind.h"
#endif // defined(OS_POSIX)
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
+
+FilePath::CharType kDefaultPluginLibraryName[] =
+ FILE_PATH_LITERAL("default_plugin");
#if defined(OS_MACOSX)
// Plugin Groups for Mac.
@@ -74,7 +78,7 @@ static const PluginGroupDefinition kGroupDefinitions[] = {
// TODO(panayiotis): We should group "RealJukebox NS Plugin" with the rest of
// the RealPlayer files.
static const VersionRangeDefinition kQuicktimeVersionRange[] = {
- { "", "", "7.6.9" }
+ { "", "", "7.6.8" }
};
static const VersionRangeDefinition kJavaVersionRange[] = {
{ "0", "7", "6.0.220" } // "220" is not a typo.
@@ -97,9 +101,6 @@ static const VersionRangeDefinition kShockwaveVersionRange[] = {
static const VersionRangeDefinition kDivXVersionRange[] = {
{ "", "", "1.4.3.4" }
};
-static const VersionRangeDefinition kRealPlayerVersionRange[] = {
- { "", "", "12.0.1.609" }
-};
static const PluginGroupDefinition kGroupDefinitions[] = {
{ "apple-quicktime", "Quicktime", "QuickTime Plug-in", kQuicktimeVersionRange,
arraysize(kQuicktimeVersionRange),
@@ -121,14 +122,16 @@ static const PluginGroupDefinition kGroupDefinitions[] = {
arraysize(kDivXVersionRange),
"http://download.divx.com/divx/autoupdate/player/"
"DivXWebPlayerInstaller.exe" },
- { "realplayer", "RealPlayer", "RealPlayer", kRealPlayerVersionRange,
- arraysize(kRealPlayerVersionRange),
- "http://www.real.com/realplayer" },
// These are here for grouping, no vulnerabilities known.
{ "windows-media-player", "Windows Media Player", "Windows Media Player",
NULL, 0, "" },
{ "microsoft-office", "Microsoft Office", "Microsoft Office",
NULL, 0, "" },
+ // TODO(panayiotis): The vulnerable versions are
+ // (v >= 6.0.12.1040 && v <= 6.0.12.1663)
+ // || v == 6.0.12.1698 || v == 6.0.12.1741
+ { "realplayer", "RealPlayer", "RealPlayer", NULL, 0,
+ "www.real.com/realplayer/downloads" },
};
#else
@@ -778,4 +781,5 @@ void PluginList::Shutdown() {
#endif
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/plugins/npapi/plugin_list.h b/webkit/plugins/npapi/plugin_list.h
new file mode 100644
index 0000000..94124a2
--- /dev/null
+++ b/webkit/plugins/npapi/plugin_list.h
@@ -0,0 +1,339 @@
+// Copyright (c) 2010 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.
+
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_
+
+#include <set>
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/file_path.h"
+#include "base/linked_ptr.h"
+#include "base/lock.h"
+#include "third_party/npapi/bindings/nphostapi.h"
+#include "webkit/plugins/npapi/plugin_group.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
+
+class GURL;
+
+namespace base {
+
+template <typename T>
+struct DefaultLazyInstanceTraits;
+
+} // namespace base
+
+namespace webkit {
+namespace npapi {
+
+extern FilePath::CharType kDefaultPluginLibraryName[];
+
+class PluginInstance;
+
+// This struct holds entry points into a plugin. The entry points are
+// slightly different between Win/Mac and Unixes.
+struct PluginEntryPoints {
+#if !defined(OS_POSIX) || defined(OS_MACOSX)
+ NP_GetEntryPointsFunc np_getentrypoints;
+#endif
+ NP_InitializeFunc np_initialize;
+ NP_ShutdownFunc np_shutdown;
+};
+
+// This struct fully describes a plugin. For external plugins, it's read in from
+// the version info of the dll; For internal plugins, it's predefined and
+// includes addresses of entry functions. (Yes, it's Win32 NPAPI-centric, but
+// it'll do for holding descriptions of internal plugins cross-platform.)
+struct PluginVersionInfo {
+ FilePath path;
+ // Info about the plugin itself.
+ std::wstring product_name;
+ std::wstring file_description;
+ std::wstring file_version;
+ // Info about the data types that the plugin supports.
+ std::wstring mime_types;
+ std::wstring file_extensions;
+ std::wstring type_descriptions;
+ // Entry points for internal plugins. Pointers are NULL for external plugins.
+ PluginEntryPoints entry_points;
+};
+
+// The PluginList is responsible for loading our NPAPI based plugins. It does
+// so in whatever manner is appropriate for the platform. On Windows, it loads
+// plugins from a known directory by looking for DLLs which start with "NP",
+// and checking to see if they are valid NPAPI libraries. On the Mac, it walks
+// the machine-wide and user plugin directories and loads anything that has
+// the correct types. On Linux, it walks the plugin directories as well
+// (e.g. /usr/lib/browser-plugins/).
+// This object is thread safe.
+class PluginList {
+ public:
+ // Gets the one instance of the PluginList.
+ static PluginList* Singleton();
+
+ // Returns true if we're in debug-plugin-loading mode. This is controlled
+ // by a command line switch.
+ static bool DebugPluginLoading();
+
+ static const PluginGroupDefinition* GetPluginGroupDefinitions();
+ static size_t GetPluginGroupDefinitionsSize();
+
+ // Returns true iff the plugin list has been loaded already.
+ bool PluginsLoaded();
+
+ // Cause the plugin list to refresh next time they are accessed, regardless
+ // of whether they are already loaded.
+ void RefreshPlugins();
+
+ // Add/Remove an extra plugin to load when we actually do the loading. Must
+ // be called before the plugins have been loaded.
+ void AddExtraPluginPath(const FilePath& plugin_path);
+ void RemoveExtraPluginPath(const FilePath& plugin_path);
+
+ // Same as above, but specifies a directory in which to search for plugins.
+ void AddExtraPluginDir(const FilePath& plugin_dir);
+
+ // Register an internal plugin with the specified plugin information and
+ // function pointers. An internal plugin must be registered before it can
+ // be loaded using PluginList::LoadPlugin().
+ void RegisterInternalPlugin(const PluginVersionInfo& info);
+
+ // Removes a specified internal plugin from the list. The search will match
+ // on the path from the version info previously registered.
+ //
+ // This is generally only necessary for tests.
+ void UnregisterInternalPlugin(const FilePath& path);
+
+ // Creates a WebPluginInfo structure given a plugin's path. On success
+ // returns true, with the information being put into "info". If it's an
+ // internal plugin, "entry_points" is filled in as well with a
+ // internally-owned PluginEntryPoints pointer.
+ // Returns false if the library couldn't be found, or if it's not a plugin.
+ bool ReadPluginInfo(const FilePath& filename,
+ WebPluginInfo* info,
+ const PluginEntryPoints** entry_points);
+
+ // Populate a WebPluginInfo from a PluginVersionInfo.
+ static bool CreateWebPluginInfo(const PluginVersionInfo& pvi,
+ WebPluginInfo* info);
+
+ // Shutdown all plugins. Should be called at process teardown.
+ void Shutdown();
+
+ // Get all the plugins.
+ void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins);
+
+ // Get all the enabled plugins.
+ void GetEnabledPlugins(bool refresh, 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
+ // which |info->enabled| is false). The mime type which corresponds
+ // to the URL is optionally returned back in |actual_mime_types| (if
+ // it is non-NULL), one for each of the plugin info objects found.
+ // The |allow_wildcard| parameter controls whether this function
+ // returns plugins which support wildcard mime types (* as the mime
+ // type). The |info| parameter is required to be non-NULL. The
+ // list is in order of "most desirable" to "least desirable",
+ // meaning that the default plugin is at the end of the list.
+ void GetPluginInfoArray(const GURL& url,
+ const std::string& mime_type,
+ bool allow_wildcard,
+ std::vector<WebPluginInfo>* info,
+ std::vector<std::string>* actual_mime_types);
+
+ // Returns the first item from the list returned in GetPluginInfo in |info|.
+ // Returns true if it found a match. |actual_mime_type| may be NULL.
+ bool GetPluginInfo(const GURL& url,
+ const std::string& mime_type,
+ bool allow_wildcard,
+ WebPluginInfo* info,
+ std::string* actual_mime_type);
+
+ // Get plugin info by plugin path (including disabled plugins). Returns true
+ // if the plugin is found and WebPluginInfo has been filled in |info|.
+ bool GetPluginInfoByPath(const FilePath& plugin_path,
+ WebPluginInfo* info);
+
+ // Populates the given vector with all available plugin groups.
+ void GetPluginGroups(bool load_if_necessary,
+ std::vector<PluginGroup>* plugin_groups);
+
+ // Returns the PluginGroup corresponding to the given WebPluginInfo. If no
+ // such group exists, it is created and added to the cache.
+ // Beware: when calling this from the Browser process, the group that the
+ // returned pointer points to might disappear suddenly. This happens when
+ // |RefreshPlugins()| is called and then |LoadPlugins()| is triggered by a
+ // call to |GetPlugins()|, |GetEnabledPlugins()|, |GetPluginInfoArray()|,
+ // |GetPluginInfoByPath()|, or |GetPluginGroups(true, _)|. It is the caller's
+ // responsibility to make sure this doesn't happen.
+ const PluginGroup* GetPluginGroup(const WebPluginInfo& web_plugin_info);
+
+ // Returns the name of the PluginGroup with the given identifier.
+ // If no such group exists, an empty string is returned.
+ string16 GetPluginGroupName(std::string identifier);
+
+ // Returns the identifier string of the PluginGroup corresponding to the given
+ // WebPluginInfo. If no such group exists, it is created and added to the
+ // cache.
+ std::string GetPluginGroupIdentifier(const WebPluginInfo& web_plugin_info);
+
+ // Load a specific plugin with full path.
+ void LoadPlugin(const FilePath& filename,
+ std::vector<WebPluginInfo>* plugins);
+
+ // Enable a specific plugin, specified by path. Returns |true| iff a plugin
+ // currently in the plugin list was actually enabled as a result; regardless
+ // of return value, if a plugin is found in the future with the given name, it
+ // will be enabled. Note that plugins are enabled by default as far as
+ // |PluginList| is concerned.
+ bool EnablePlugin(const FilePath& filename);
+
+ // Disable a specific plugin, specified by path. Returns |true| iff a plugin
+ // currently in the plugin list was actually disabled as a result; regardless
+ // of return value, if a plugin is found in the future with the given name, it
+ // will be disabled.
+ bool DisablePlugin(const FilePath& filename);
+
+ // Enable/disable a plugin group, specified by group_name. Returns |true| iff
+ // a plugin currently in the plugin list was actually enabled/disabled as a
+ // result; regardless of return value, if a plugin is found in the future with
+ // the given name, it will be enabled/disabled. Note that plugins are enabled
+ // by default as far as |PluginList| is concerned.
+ bool EnableGroup(bool enable, const string16& name);
+
+ // Disable all plugins groups that are known to be outdated, according to
+ // the information hardcoded in PluginGroup, to make sure that they can't
+ // be loaded on a web page and instead show a UI to update to the latest
+ // version.
+ void DisableOutdatedPluginGroups();
+
+ ~PluginList();
+
+ private:
+ FRIEND_TEST_ALL_PREFIXES(PluginGroupTest, PluginGroupDefinition);
+
+ // Constructors are private for singletons
+ PluginList();
+
+ // Creates PluginGroups for the static group definitions, and adds them to
+ // the PluginGroup cache of this PluginList.
+ void AddHardcodedPluginGroups();
+
+ // Adds the given WebPluginInfo to its corresponding group, creating it if
+ // necessary, and returns the group.
+ // Callers need to protect calls to this method by a lock themselves.
+ PluginGroup* AddToPluginGroups(const WebPluginInfo& web_plugin_info);
+
+ // Load all plugins from the default plugins directory
+ void LoadPlugins(bool refresh);
+
+ // Load all plugins from a specific directory.
+ // |plugins| is updated with loaded plugin information.
+ // |visited_plugins| is updated with paths to all plugins that were considered
+ // (including those we didn't load)
+ void LoadPluginsFromDir(const FilePath& path,
+ std::vector<WebPluginInfo>* plugins,
+ std::set<FilePath>* visited_plugins);
+
+ // Returns true if we should load the given plugin, or false otherwise.
+ // plugins is the list of plugins we have crawled in the current plugin
+ // loading run.
+ bool ShouldLoadPlugin(const WebPluginInfo& info,
+ std::vector<WebPluginInfo>* plugins);
+
+ // Return whether a plug-in group with the given name should be disabled,
+ // either because it already is on the list of disabled groups, or because it
+ // is blacklisted by a policy. In the latter case, add the plugin group to the
+ // list of disabled groups as well.
+ bool ShouldDisableGroup(const string16& group_name);
+
+ // Returns true if the given WebPluginInfo supports "mime-type".
+ // mime_type should be all lower case.
+ static bool SupportsType(const WebPluginInfo& info,
+ const std::string &mime_type,
+ bool allow_wildcard);
+
+ // Returns true if the given WebPluginInfo 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.
+ static bool SupportsExtension(const WebPluginInfo& info,
+ const std::string &extension,
+ std::string* actual_mime_type);
+
+ //
+ // Platform functions
+ //
+
+ // Do any initialization.
+ void PlatformInit();
+
+ // Get the ordered list of directories from which to load plugins
+ void GetPluginDirectories(std::vector<FilePath>* plugin_dirs);
+
+ //
+ // Command-line switches
+ //
+
+#if defined(OS_WIN)
+ // true if we shouldn't load the new WMP plugin.
+ bool dont_load_new_wmp_;
+
+ // Loads plugins registered under HKCU\Software\MozillaPlugins and
+ // HKLM\Software\MozillaPlugins.
+ void LoadPluginsFromRegistry(std::vector<WebPluginInfo>* plugins,
+ std::set<FilePath>* visited_plugins);
+#endif
+
+ //
+ // Internals
+ //
+
+ bool plugins_loaded_;
+
+ // If true, we reload plugins even if they've been loaded already.
+ bool plugins_need_refresh_;
+
+ // Contains information about the available plugins.
+ std::vector<WebPluginInfo> plugins_;
+
+ // Extra plugin paths that we want to search when loading.
+ std::vector<FilePath> extra_plugin_paths_;
+
+ // Extra plugin directories that we want to search when loading.
+ std::vector<FilePath> extra_plugin_dirs_;
+
+ // Holds information about internal plugins.
+ std::vector<PluginVersionInfo> internal_plugins_;
+
+ // Path names of plugins to disable (the default is to enable them all).
+ std::set<FilePath> disabled_plugins_;
+
+ // Group names to disable (the default is to enable them all).
+ std::set<string16> disabled_groups_;
+
+ bool disable_outdated_plugins_;
+
+ // Holds the currently available plugin groups.
+ PluginGroup::PluginMap plugin_groups_;
+
+ int next_priority_;
+
+ // Need synchronization for the above members since this object can be
+ // accessed on multiple threads.
+ Lock lock_;
+
+ friend struct base::DefaultLazyInstanceTraits<PluginList>;
+
+ DISALLOW_COPY_AND_ASSIGN(PluginList);
+};
+
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_LIST_H_
diff --git a/webkit/glue/plugins/plugin_list_mac.mm b/webkit/plugins/npapi/plugin_list_mac.mm
index e7a2337..049fe4d 100644
--- a/webkit/glue/plugins/plugin_list_mac.mm
+++ b/webkit/plugins/npapi/plugin_list_mac.mm
@@ -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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
#import <Foundation/Foundation.h>
@@ -12,7 +12,10 @@
#include "base/string_split.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
-#include "webkit/glue/plugins/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+
+namespace webkit {
+namespace npapi {
namespace {
@@ -62,9 +65,6 @@ bool IsBlacklistedPlugin(const WebPluginInfo& info) {
} // namespace
-namespace NPAPI
-{
-
void PluginList::PlatformInit() {
}
@@ -106,4 +106,5 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
return true;
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_list_posix.cc b/webkit/plugins/npapi/plugin_list_posix.cc
index 654c0c5..fd5e5b7 100644
--- a/webkit/glue/plugins/plugin_list_posix.cc
+++ b/webkit/plugins/npapi/plugin_list_posix.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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
#include "base/file_util.h"
#include "base/path_service.h"
@@ -11,6 +11,9 @@
#include "base/string_util.h"
#include "build/build_config.h"
+namespace webkit {
+namespace npapi {
+
namespace {
// We build up a list of files and mtimes so we can sort them.
@@ -100,9 +103,7 @@ bool IsBlacklistedPlugin(const FilePath& path) {
return IsBlacklistedBySha1sum(path);
}
-} // anonymous namespace
-
-namespace NPAPI {
+} // namespace
void PluginList::PlatformInit() {
}
@@ -267,4 +268,5 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
return true;
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_list_win.cc b/webkit/plugins/npapi/plugin_list_win.cc
index 4869262..d7f13ef 100644
--- a/webkit/glue/plugins/plugin_list_win.cc
+++ b/webkit/plugins/npapi/plugin_list_win.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/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
#include <tchar.h>
@@ -17,29 +17,33 @@
#include "base/string_split.h"
#include "base/string_util.h"
#include "base/win/registry.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/plugin_switches.h"
#include "webkit/glue/webkit_glue.h"
+namespace webkit {
+namespace npapi {
+
namespace {
-const TCHAR kRegistryApps[] =
- _T("Software\\Microsoft\\Windows\\CurrentVersion\\App Paths");
-const TCHAR kRegistryFirefox[] = _T("firefox.exe");
-const TCHAR kRegistryAcrobat[] = _T("Acrobat.exe");
-const TCHAR kRegistryAcrobatReader[] = _T("AcroRd32.exe");
-const TCHAR kRegistryWindowsMedia[] = _T("wmplayer.exe");
-const TCHAR kRegistryQuickTime[] = _T("QuickTimePlayer.exe");
-const TCHAR kRegistryPath[] = _T("Path");
-const TCHAR kRegistryFirefoxInstalled[] =
- _T("SOFTWARE\\Mozilla\\Mozilla Firefox");
-const TCHAR kRegistryJava[] =
- _T("Software\\JavaSoft\\Java Runtime Environment");
-const TCHAR kRegistryBrowserJavaVersion[] = _T("BrowserJavaVersion");
-const TCHAR kRegistryCurrentJavaVersion[] = _T("CurrentVersion");
-const TCHAR kRegistryJavaHome[] = _T("JavaHome");
-const TCHAR kJavaDeploy1[] = _T("npdeploytk.dll");
-const TCHAR kJavaDeploy2[] = _T("npdeployjava1.dll");
+const char16 kRegistryApps[] =
+ L"Software\\Microsoft\\Windows\\CurrentVersion\\App Paths";
+const char16 kRegistryFirefox[] = L"firefox.exe";
+const char16 kRegistryAcrobat[] = L"Acrobat.exe";
+const char16 kRegistryAcrobatReader[] = L"AcroRd32.exe";
+const char16 kRegistryWindowsMedia[] = L"wmplayer.exe";
+const char16 kRegistryQuickTime[] = L"QuickTimePlayer.exe";
+const char16 kRegistryPath[] = L"Path";
+const char16 kRegistryFirefoxInstalled[] =
+ L"SOFTWARE\\Mozilla\\Mozilla Firefox";
+const char16 kRegistryJava[] =
+ L"Software\\JavaSoft\\Java Runtime Environment";
+const char16 kRegistryBrowserJavaVersion[] = L"BrowserJavaVersion";
+const char16 kRegistryCurrentJavaVersion[] = L"CurrentVersion";
+const char16 kRegistryJavaHome[] = L"JavaHome";
+const char16 kJavaDeploy1[] = L"npdeploytk.dll";
+const char16 kJavaDeploy2[] = L"npdeployjava1.dll";
// The application path where we expect to find plugins.
void GetAppDirectory(std::set<FilePath>* plugin_dirs) {
@@ -62,7 +66,7 @@ void GetExeDirectory(std::set<FilePath>* plugin_dirs) {
}
// Gets the installed path for a registered app.
-bool GetInstalledPath(const TCHAR* app, FilePath* out) {
+bool GetInstalledPath(const char16* app, FilePath* out) {
std::wstring reg_path(kRegistryApps);
reg_path.append(L"\\");
reg_path.append(app);
@@ -210,11 +214,9 @@ void GetJavaDirectory(std::set<FilePath>* plugin_dirs) {
} // anonymous namespace
-namespace NPAPI {
-
void PluginList::PlatformInit() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- dont_load_new_wmp_ = command_line.HasSwitch(kUseOldWMPPluginSwitch);
+ dont_load_new_wmp_ = command_line.HasSwitch(switches::kUseOldWMPPlugin);
}
void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
@@ -407,4 +409,5 @@ bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info,
return true;
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_stream.cc b/webkit/plugins/npapi/plugin_stream.cc
index e465e2d..fee63eb 100644
--- a/webkit/glue/plugins/plugin_stream.cc
+++ b/webkit/plugins/npapi/plugin_stream.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -6,16 +6,17 @@
// TODO : Support NP_SEEK mode
// TODO : Support SEEKABLE=true in NewStream
-#include "webkit/glue/plugins/plugin_stream.h"
+#include "webkit/plugins/npapi/plugin_stream.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/utf_string_conversions.h"
#include "net/base/mime_util.h"
-#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
#include "googleurl/src/gurl.h"
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
PluginStream::~PluginStream() {
// always close our temporary files.
@@ -244,7 +245,7 @@ bool PluginStream::Close(NPReason reason) {
return true;
}
-webkit_glue::WebPluginResourceClient* PluginStream::AsResourceClient() {
+WebPluginResourceClient* PluginStream::AsResourceClient() {
return NULL;
}
@@ -255,4 +256,5 @@ void PluginStream::Notify(NPReason reason) {
}
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_stream.h b/webkit/plugins/npapi/plugin_stream.h
index c5975b4..040e4fe 100644
--- a/webkit/glue/plugins/plugin_stream.h
+++ b/webkit/plugins/npapi/plugin_stream.h
@@ -2,27 +2,22 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_PLUGIN_STREAM_H_
-#define WEBKIT_GLUE_PLUGINS_PLUGIN_STREAM_H_
-
-#include "build/build_config.h"
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_H_
#include <string>
#include <vector>
-#if defined(OS_POSIX)
#include "base/file_path.h"
-#endif
#include "base/ref_counted.h"
+#include "build/build_config.h"
#include "third_party/npapi/bindings/npapi.h"
-namespace webkit_glue {
-class WebPluginResourceClient;
-}
-
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
class PluginInstance;
+class WebPluginResourceClient;
// Base class for a NPAPI stream. Tracks basic elements
// of a stream for NPAPI notifications and stream position.
@@ -64,7 +59,7 @@ class PluginStream : public base::RefCounted<PluginStream> {
// Close the stream.
virtual bool Close(NPReason reason);
- virtual webkit_glue::WebPluginResourceClient* AsResourceClient();
+ virtual WebPluginResourceClient* AsResourceClient();
// Cancels any HTTP requests initiated by the stream.
virtual void CancelRequest() {}
@@ -151,6 +146,7 @@ class PluginStream : public base::RefCounted<PluginStream> {
DISALLOW_COPY_AND_ASSIGN(PluginStream);
};
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGINS_PLUGIN_STREAM_H_
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_H_
diff --git a/webkit/glue/plugins/plugin_stream_posix.cc b/webkit/plugins/npapi/plugin_stream_posix.cc
index d0e2291..7a89ff1 100644
--- a/webkit/glue/plugins/plugin_stream_posix.cc
+++ b/webkit/plugins/npapi/plugin_stream_posix.cc
@@ -2,16 +2,17 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/plugin_stream.h"
+#include "webkit/plugins/npapi/plugin_stream.h"
#include <string.h>
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
PluginStream::PluginStream(
PluginInstance *instance,
@@ -71,4 +72,5 @@ bool PluginStream::TempFileIsValid() {
return temp_file_ != NULL;
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_stream_url.cc b/webkit/plugins/npapi/plugin_stream_url.cc
index 7f9f355..b7efcdf 100644
--- a/webkit/glue/plugins/plugin_stream_url.cc
+++ b/webkit/plugins/npapi/plugin_stream_url.cc
@@ -2,15 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/plugin_stream_url.h"
+#include "webkit/plugins/npapi/plugin_stream_url.h"
#include "net/http/http_response_headers.h"
-#include "webkit/glue/plugins/plugin_host.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_lib.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/plugin_host.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/npapi/webplugin.h"
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
PluginStreamUrl::PluginStreamUrl(
unsigned long resource_id,
@@ -39,8 +40,8 @@ bool PluginStreamUrl::Close(NPReason reason) {
return result;
}
-webkit_glue::WebPluginResourceClient* PluginStreamUrl::AsResourceClient() {
- return static_cast<webkit_glue::WebPluginResourceClient*>(this);
+WebPluginResourceClient* PluginStreamUrl::AsResourceClient() {
+ return static_cast<WebPluginResourceClient*>(this);
}
void PluginStreamUrl::WillSendRequest(const GURL& url, int http_status_code) {
@@ -127,4 +128,5 @@ void PluginStreamUrl::CancelRequest() {
}
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_stream_url.h b/webkit/plugins/npapi/plugin_stream_url.h
index 8642897..312f8de 100644
--- a/webkit/glue/plugins/plugin_stream_url.h
+++ b/webkit/plugins/npapi/plugin_stream_url.h
@@ -2,21 +2,21 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__
-#define WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_
-
-#include "webkit/glue/plugins/plugin_stream.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/plugin_stream.h"
+#include "webkit/plugins/npapi/webplugin.h"
#include "googleurl/src/gurl.h"
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
class PluginInstance;
// A NPAPI Stream based on a URL.
class PluginStreamUrl : public PluginStream,
- public webkit_glue::WebPluginResourceClient {
+ public WebPluginResourceClient {
public:
// Create a new stream for sending to the plugin by fetching
// a URL. If notifyNeeded is set, then the plugin will be notified
@@ -34,7 +34,7 @@ class PluginStreamUrl : public PluginStream,
// it is still loading.
virtual bool Close(NPReason reason);
- virtual webkit_glue::WebPluginResourceClient* AsResourceClient();
+ virtual WebPluginResourceClient* AsResourceClient();
virtual void CancelRequest();
@@ -60,6 +60,7 @@ class PluginStreamUrl : public PluginStream,
DISALLOW_COPY_AND_ASSIGN(PluginStreamUrl);
};
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGIN_PLUGIN_STREAM_URL_H__
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_STREAM_URL_H_
diff --git a/webkit/glue/plugins/plugin_stream_win.cc b/webkit/plugins/npapi/plugin_stream_win.cc
index 0b6fcbd..edc9770 100644
--- a/webkit/glue/plugins/plugin_stream_win.cc
+++ b/webkit/plugins/npapi/plugin_stream_win.cc
@@ -1,13 +1,14 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/plugin_stream.h"
+#include "webkit/plugins/npapi/plugin_stream.h"
#include "base/logging.h"
-#include "webkit/glue/plugins/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
PluginStream::PluginStream(
PluginInstance *instance,
@@ -94,4 +95,5 @@ bool PluginStream::TempFileIsValid() {
return temp_file_handle_ != INVALID_HANDLE_VALUE;
}
-} // namespace NPAPI
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_string_stream.cc b/webkit/plugins/npapi/plugin_string_stream.cc
index f174267..d38b4c1 100644
--- a/webkit/glue/plugins/plugin_string_stream.cc
+++ b/webkit/plugins/npapi/plugin_string_stream.cc
@@ -1,12 +1,13 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/plugin_string_stream.h"
+#include "webkit/plugins/npapi/plugin_string_stream.h"
#include "googleurl/src/gurl.h"
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
PluginStringStream::PluginStringStream(
PluginInstance* instance,
@@ -34,4 +35,5 @@ void PluginStringStream::SendToPlugin(const std::string &data,
}
}
-}
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/plugin_string_stream.h b/webkit/plugins/npapi/plugin_string_stream.h
index 68db2bf..1fdeea2 100644
--- a/webkit/glue/plugins/plugin_string_stream.h
+++ b/webkit/plugins/npapi/plugin_string_stream.h
@@ -2,14 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_STRING_STREAM_H_
-#define WEBKIT_GLUE_PLUGIN_PLUGIN_STRING_STREAM_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_STRING_STREAM_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_STRING_STREAM_H_
-#include "webkit/glue/plugins/plugin_stream.h"
+#include "webkit/plugins/npapi/plugin_stream.h"
class GURL;
-namespace NPAPI {
+namespace webkit {
+namespace npapi {
class PluginInstance;
@@ -34,6 +35,8 @@ class PluginStringStream : public PluginStream {
DISALLOW_COPY_AND_ASSIGN(PluginStringStream);
};
-} // namespace NPAPI
-#endif // WEBKIT_GLUE_PLUGIN_PLUGIN_STRING_STREAM_H_
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_STRING_STREAM_H_
diff --git a/webkit/glue/plugins/plugin_web_event_converter_mac.h b/webkit/plugins/npapi/plugin_web_event_converter_mac.h
index ec5b86f..a525428 100644
--- a/webkit/glue/plugins/plugin_web_event_converter_mac.h
+++ b/webkit/plugins/npapi/plugin_web_event_converter_mac.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_WEB_EVENT_CONVERTER_MAC_H_
-#define WEBKIT_GLUE_PLUGIN_PLUGIN_WEB_EVENT_CONVERTER_MAC_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGIN_WEB_EVENT_CONVERTER_MAC_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGIN_WEB_EVENT_CONVERTER_MAC_H_
#include "third_party/npapi/bindings/npapi.h"
@@ -14,6 +14,9 @@ class WebMouseEvent;
class WebMouseWheelEvent;
}
+namespace webkit {
+namespace npapi {
+
// Utility class to translating WebInputEvent structs to equivalent structures
// suitable for sending to Mac plugins (via NPP_HandleEvent).
class PluginWebEventConverter {
@@ -31,7 +34,7 @@ class PluginWebEventConverter {
// Returns NULL iff InitWithEvent returned false.
virtual void* plugin_event() = 0;
-protected:
+ protected:
// To be overridden by subclasses to store a converted plugin representation
// of the given web event, suitable for returning from plugin_event.
// Returns true if the event was successfully converted.
@@ -57,4 +60,7 @@ class PluginWebEventConverterFactory {
DISALLOW_COPY_AND_ASSIGN(PluginWebEventConverterFactory);
};
-#endif // WEBKIT_GLUE_PLUGIN_PLUGIN_WEB_EVENT_CONVERTER_MAC_H_
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGIN_WEB_EVENT_CONVERTER_MAC_H_
diff --git a/webkit/glue/plugins/plugin_web_event_converter_mac.mm b/webkit/plugins/npapi/plugin_web_event_converter_mac.mm
index 12d5cc6..ba45f2e 100644
--- a/webkit/glue/plugins/plugin_web_event_converter_mac.mm
+++ b/webkit/plugins/npapi/plugin_web_event_converter_mac.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
#include "base/logging.h"
-#include "webkit/glue/plugins/plugin_web_event_converter_mac.h"
+#include "webkit/plugins/npapi/plugin_web_event_converter_mac.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
using WebKit::WebInputEvent;
@@ -13,6 +13,9 @@ using WebKit::WebKeyboardEvent;
using WebKit::WebMouseEvent;
using WebKit::WebMouseWheelEvent;
+namespace webkit {
+namespace npapi {
+
namespace {
// Returns true if the caps lock flag should be set for the given event.
@@ -357,3 +360,6 @@ PluginWebEventConverter*
return NULL;
}
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/quickdraw_drawing_manager_mac.cc b/webkit/plugins/npapi/quickdraw_drawing_manager_mac.cc
index 424cc1e..26db55d 100644
--- a/webkit/glue/plugins/quickdraw_drawing_manager_mac.cc
+++ b/webkit/plugins/npapi/quickdraw_drawing_manager_mac.cc
@@ -4,15 +4,18 @@
#ifndef NP_NO_QUICKDRAW
-#include "webkit/glue/plugins/quickdraw_drawing_manager_mac.h"
+#include "webkit/plugins/npapi/quickdraw_drawing_manager_mac.h"
-#include "webkit/glue/plugins/coregraphics_private_symbols_mac.h"
+#include "webkit/plugins/npapi/coregraphics_private_symbols_mac.h"
// Turn off GCC warnings about deprecated functions (since QuickDraw is a
// deprecated API). According to the GCC documentation, this can only be done
// per file, not pushed and popped like some options can be.
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+namespace webkit {
+namespace npapi {
+
QuickDrawDrawingManager::QuickDrawDrawingManager()
: plugin_window_(NULL), target_context_(NULL), fast_path_enabled_(false),
current_port_(NULL), target_world_(NULL), plugin_world_(NULL) {}
@@ -151,4 +154,7 @@ void QuickDrawDrawingManager::CopyGWorldBits(GWorldPtr source, GWorldPtr dest,
}
}
+} // namespace npapi
+} // namespace webkit
+
#endif // !NP_NO_QUICKDRAW
diff --git a/webkit/glue/plugins/quickdraw_drawing_manager_mac.h b/webkit/plugins/npapi/quickdraw_drawing_manager_mac.h
index 8163f92..02d04d9 100644
--- a/webkit/glue/plugins/quickdraw_drawing_manager_mac.h
+++ b/webkit/plugins/npapi/quickdraw_drawing_manager_mac.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_QUICKDRAW_DRAWING_MANAGER_MAC_H_
-#define WEBKIT_GLUE_QUICKDRAW_DRAWING_MANAGER_MAC_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_QUICKDRAW_DRAWING_MANAGER_MAC_H_
+#define WEBKIT_PLUGINS_NPAPI_QUICKDRAW_DRAWING_MANAGER_MAC_H_
#ifndef NP_NO_QUICKDRAW
@@ -11,6 +11,9 @@
#include "gfx/rect.h"
+namespace webkit {
+namespace npapi {
+
// Plugin helper class encapsulating the details of capturing what a QuickDraw
// drawing model plugin draws, then drawing it into a CGContext.
class QuickDrawDrawingManager {
@@ -78,6 +81,9 @@ class QuickDrawDrawingManager {
GWorldPtr plugin_world_; // Created lazily; may be NULL.
};
+} // namespace npapi
+} // namespace webkit
+
#endif // !NP_NO_QUICKDRAW
-#endif // QUICKDRAW_DRAWING_MANAGER_MAC
+#endif // WEBKIT_PLUGINS_NPAPI_QUICKDRAW_DRAWING_MANAGER_MAC_H_
diff --git a/webkit/glue/plugins/test/Info.plist b/webkit/plugins/npapi/test/Info.plist
index 37145fd..37145fd 100644
--- a/webkit/glue/plugins/test/Info.plist
+++ b/webkit/plugins/npapi/test/Info.plist
diff --git a/webkit/glue/plugins/test/npapi_constants.cc b/webkit/plugins/npapi/test/npapi_constants.cc
index 75cc68f..94d3284 100644
--- a/webkit/glue/plugins/test/npapi_constants.cc
+++ b/webkit/plugins/npapi/test/npapi_constants.cc
@@ -1,10 +1,12 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/npapi_constants.h"
+#include "webkit/plugins/npapi/test/npapi_constants.h"
namespace NPAPIClient {
+
const char kTestCompleteCookie[] = "status";
const char kTestCompleteSuccess[] = "OK";
-}
+
+} // namespace NPAPIClient
diff --git a/webkit/glue/plugins/test/npapi_constants.h b/webkit/plugins/npapi/test/npapi_constants.h
index 6570c35..2d375b0 100644
--- a/webkit/glue/plugins/test/npapi_constants.h
+++ b/webkit/plugins/npapi/test/npapi_constants.h
@@ -1,13 +1,14 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
// Constants for the NPAPI test
-#ifndef WEBKIT_PORT_PLUGINS_TEST_NPAPI_CONSTANTS_H__
-#define WEBKIT_PORT_PLUGINS_TEST_NPAPI_CONSTANTS_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_NPAPI_CONSTANTS_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_NPAPI_CONSTANTS_H_
namespace NPAPIClient {
+
// The name of the cookie which will be used to communicate between
// the plugin and the test harness.
extern const char kTestCompleteCookie[];
@@ -15,5 +16,7 @@ extern const char kTestCompleteCookie[];
// The cookie value which will be sent to the client upon successful
// test.
extern const char kTestCompleteSuccess[];
-}
-#endif // WEBKIT_PORT_PLUGINS_TEST_NPAPI_CONSTANTS_H__
+
+} // namespace NPAPIClient
+
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_NPAPI_CONSTANTS_H_
diff --git a/webkit/glue/plugins/test/npapi_test.cc b/webkit/plugins/npapi/test/npapi_test.cc
index 895a842..26dc45d 100644
--- a/webkit/glue/plugins/test/npapi_test.cc
+++ b/webkit/plugins/npapi/test/npapi_test.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -53,7 +53,7 @@
#define EXPORT
#endif
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
#if defined(OS_WIN)
BOOL API_CALL DllMain(HINSTANCE hDll, DWORD dwReason, LPVOID lpReserved) {
diff --git a/webkit/glue/plugins/test/npapi_test.def b/webkit/plugins/npapi/test/npapi_test.def
index 4481c16..4481c16 100644
--- a/webkit/glue/plugins/test/npapi_test.def
+++ b/webkit/plugins/npapi/test/npapi_test.def
diff --git a/webkit/glue/plugins/test/npapi_test.rc b/webkit/plugins/npapi/test/npapi_test.rc
index 524dda4..524dda4 100644
--- a/webkit/glue/plugins/test/npapi_test.rc
+++ b/webkit/plugins/npapi/test/npapi_test.rc
diff --git a/webkit/glue/plugins/test/plugin_arguments_test.cc b/webkit/plugins/npapi/test/plugin_arguments_test.cc
index 46ccf43..fe1e54e 100644
--- a/webkit/glue/plugins/test/plugin_arguments_test.cc
+++ b/webkit/plugins/npapi/test/plugin_arguments_test.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "webkit/plugins/npapi/test/plugin_arguments_test.h"
+
#include "base/basictypes.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
-#include "webkit/glue/plugins/test/plugin_arguments_test.h"
-
namespace NPAPIClient {
PluginArgumentsTest::PluginArgumentsTest(NPP id,
@@ -66,4 +66,4 @@ NPError PluginArgumentsTest::SetWindow(NPWindow* pNPWindow) {
return NPERR_NO_ERROR;
}
-} // namespace NPAPIClient
+} // namespace NPAPIClient
diff --git a/webkit/glue/plugins/test/plugin_arguments_test.h b/webkit/plugins/npapi/test/plugin_arguments_test.h
index aa05f19..c2a0eaa 100644
--- a/webkit/glue/plugins/test/plugin_arguments_test.h
+++ b/webkit/plugins/npapi/test/plugin_arguments_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_ARGUMENTS_TEST_H__
-#define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_ARGUMENTS_TEST_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_ARGUMENTS_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_ARGUMENTS_TEST_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -38,6 +38,6 @@ class PluginArgumentsTest : public PluginTest {
virtual NPError SetWindow(NPWindow* pNPWindow);
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_ARGUMENTS_TEST_H__
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_ARGUMENTS_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_client.cc b/webkit/plugins/npapi/test/plugin_client.cc
index 8358340..0b28250 100644
--- a/webkit/glue/plugins/test/plugin_client.cc
+++ b/webkit/plugins/npapi/test/plugin_client.cc
@@ -1,12 +1,12 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
#include "base/string_util.h"
-#include "webkit/glue/plugins/test/plugin_test.h"
-#include "webkit/glue/plugins/test/plugin_test_factory.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test_factory.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_client.h b/webkit/plugins/npapi/test/plugin_client.h
index a6291b0..c06be2d 100644
--- a/webkit/glue/plugins/test/plugin_client.h
+++ b/webkit/plugins/npapi/test/plugin_client.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_CLIENT_H__
-#define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_CLIENT_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_CLIENT_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_CLIENT_H_
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/nphostapi.h"
@@ -40,6 +40,6 @@ class PluginClient {
static NPNetscapeFuncs* host_functions_;
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_CLIENT_H__
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_CLIENT_H_
diff --git a/webkit/glue/plugins/test/plugin_create_instance_in_paint.cc b/webkit/plugins/npapi/test/plugin_create_instance_in_paint.cc
index f98f89b..09d6bdc 100644
--- a/webkit/glue/plugins/test/plugin_create_instance_in_paint.cc
+++ b/webkit/plugins/npapi/test/plugin_create_instance_in_paint.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_create_instance_in_paint.h"
+#include "webkit/plugins/npapi/test/plugin_create_instance_in_paint.h"
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_create_instance_in_paint.h b/webkit/plugins/npapi/test/plugin_create_instance_in_paint.h
index 84d7a94..59f196f 100644
--- a/webkit/glue/plugins/test/plugin_create_instance_in_paint.h
+++ b/webkit/plugins/npapi/test/plugin_create_instance_in_paint.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_CREATE_INSTANCE_IN_PAINT_H
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_CREATE_INSTANCE_IN_PAINT_H
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_CREATE_INSTANCE_IN_PAINT_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_CREATE_INSTANCE_IN_PAINT_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -28,6 +28,6 @@ class CreateInstanceInPaintTest : public PluginTest {
bool created_;
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_CREATE_INSTANCE_IN_PAINT_H
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_CREATE_INSTANCE_IN_PAINT_H_
diff --git a/webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.cc b/webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.cc
index 15318b4..fad7992 100644
--- a/webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.cc
+++ b/webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.cc
@@ -1,10 +1,10 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.h"
+#include "webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.h"
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.h b/webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.h
index 418e976..dca9de3 100644
--- a/webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.h
+++ b/webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_DELETE_PLUGIN_IN_STREAM_TEST_H
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_DELETE_PLUGIN_IN_STREAM_TEST_H
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_DELETE_PLUGIN_IN_STREAM_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_DELETE_PLUGIN_IN_STREAM_TEST_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -25,6 +25,6 @@ class DeletePluginInStreamTest : public PluginTest {
std::string self_url_;
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_DELETE_PLUGIN_IN_STREAM_TEST_H
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_DELETE_PLUGIN_IN_STREAM_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_get_javascript_url2_test.cc b/webkit/plugins/npapi/test/plugin_get_javascript_url2_test.cc
index d17dced..e7595f2 100644
--- a/webkit/glue/plugins/test/plugin_get_javascript_url2_test.cc
+++ b/webkit/plugins/npapi/test/plugin_get_javascript_url2_test.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_get_javascript_url2_test.h"
+#include "webkit/plugins/npapi/test/plugin_get_javascript_url2_test.h"
#include "base/basictypes.h"
diff --git a/webkit/glue/plugins/test/plugin_get_javascript_url2_test.h b/webkit/plugins/npapi/test/plugin_get_javascript_url2_test.h
index 557da76..b5c398e 100644
--- a/webkit/glue/plugins/test/plugin_get_javascript_url2_test.h
+++ b/webkit/plugins/npapi/test/plugin_get_javascript_url2_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL2_H
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL2_H
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL2_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL2_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -33,6 +33,6 @@ class ExecuteGetJavascriptUrl2Test : public PluginTest {
std::string self_url_;
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL2_H
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL2_H_
diff --git a/webkit/glue/plugins/test/plugin_get_javascript_url_test.cc b/webkit/plugins/npapi/test/plugin_get_javascript_url_test.cc
index 50f5e5a..ea32fac 100644
--- a/webkit/glue/plugins/test/plugin_get_javascript_url_test.cc
+++ b/webkit/plugins/npapi/test/plugin_get_javascript_url_test.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_get_javascript_url_test.h"
+#include "webkit/plugins/npapi/test/plugin_get_javascript_url_test.h"
#include "base/basictypes.h"
diff --git a/webkit/glue/plugins/test/plugin_get_javascript_url_test.h b/webkit/plugins/npapi/test/plugin_get_javascript_url_test.h
index 5c2540d..9aab3f9 100644
--- a/webkit/glue/plugins/test/plugin_get_javascript_url_test.h
+++ b/webkit/plugins/npapi/test/plugin_get_javascript_url_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL_H
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL_H
+#ifndef WEBKIT_PLUGINS_NPAPI_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL_H_
+#define WEBKIT_PLUGINS_NPAPI_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -42,6 +42,6 @@ class ExecuteGetJavascriptUrlTest : public PluginTest {
#endif
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL_H
+#endif // WEBKIT_PLUGINS_NPAPI_PLUGINS_TEST_PLUGIN_GET_JAVASCRIPT_URL_H_
diff --git a/webkit/glue/plugins/test/plugin_geturl_test.cc b/webkit/plugins/npapi/test/plugin_geturl_test.cc
index 5363a66..850a0b5 100644
--- a/webkit/glue/plugins/test/plugin_geturl_test.cc
+++ b/webkit/plugins/npapi/test/plugin_geturl_test.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/glue/plugins/test/plugin_geturl_test.h"
+#include "webkit/plugins/npapi/test/plugin_geturl_test.h"
#include <stdio.h>
diff --git a/webkit/glue/plugins/test/plugin_geturl_test.h b/webkit/plugins/npapi/test/plugin_geturl_test.h
index df8d741..79c623b 100644
--- a/webkit/glue/plugins/test/plugin_geturl_test.h
+++ b/webkit/plugins/npapi/test/plugin_geturl_test.h
@@ -1,13 +1,13 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_GETURL_TEST_H__
-#define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_GETURL_TEST_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_GETURL_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_GETURL_TEST_H_
#include <stdio.h>
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -56,6 +56,6 @@ class PluginGetURLTest : public PluginTest {
std::string referrer_target_url_;
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_GETURL_TEST_H__
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_GETURL_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_javascript_open_popup.cc b/webkit/plugins/npapi/test/plugin_javascript_open_popup.cc
index 0f93bf4..583a55e 100644
--- a/webkit/glue/plugins/test/plugin_javascript_open_popup.cc
+++ b/webkit/plugins/npapi/test/plugin_javascript_open_popup.cc
@@ -1,14 +1,14 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
#include "build/build_config.h"
-#include "webkit/glue/plugins/test/plugin_javascript_open_popup.h"
+#include "webkit/plugins/npapi/test/plugin_javascript_open_popup.h"
#if defined(USE_X11)
#include "third_party/npapi/bindings/npapi_x11.h"
#endif
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_javascript_open_popup.h b/webkit/plugins/npapi/test/plugin_javascript_open_popup.h
index 552397a..6381d25 100644
--- a/webkit/glue/plugins/test/plugin_javascript_open_popup.h
+++ b/webkit/plugins/npapi/test/plugin_javascript_open_popup.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_JAVASCRIPT_OPEN_POPUP_H
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_JAVASCRIPT_OPEN_POPUP_H
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_JAVASCRIPT_OPEN_POPUP_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_JAVASCRIPT_OPEN_POPUP_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -42,6 +42,6 @@ class ExecuteJavascriptPopupWindowTargetPluginTest : public PluginTest {
bool test_completed_;
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_JAVASCRIPT_OPEN_POPUP_H
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_JAVASCRIPT_OPEN_POPUP_H_
diff --git a/webkit/glue/plugins/test/plugin_new_fails_test.cc b/webkit/plugins/npapi/test/plugin_new_fails_test.cc
index 2feeec6..71cff01 100644
--- a/webkit/glue/plugins/test/plugin_new_fails_test.cc
+++ b/webkit/plugins/npapi/test/plugin_new_fails_test.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_new_fails_test.h"
+#include "webkit/plugins/npapi/test/plugin_new_fails_test.h"
namespace NPAPIClient {
@@ -15,4 +15,4 @@ NPError NewFailsTest::New(uint16 mode, int16 argc, const char* argn[],
return NPERR_GENERIC_ERROR;
}
-} // namespace NPAPIClient
+} // namespace NPAPIClient
diff --git a/webkit/glue/plugins/test/plugin_new_fails_test.h b/webkit/plugins/npapi/test/plugin_new_fails_test.h
index 1acf9e5..334323e 100644
--- a/webkit/glue/plugins/test/plugin_new_fails_test.h
+++ b/webkit/plugins/npapi/test/plugin_new_fails_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_PLUGIN_NEW_FAILS_TEST_H__
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_PLUGIN_NEW_FAILS_TEST_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_PLUGIN_NEW_FAILS_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_PLUGIN_NEW_FAILS_TEST_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -16,6 +16,6 @@ class NewFailsTest : public PluginTest {
const char* argv[], NPSavedData* saved);
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_PLUGIN_NPP_NEW_FAILS_TEST_H__
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_PLUGIN_NPP_NEW_FAILS_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_npobject_lifetime_test.cc b/webkit/plugins/npapi/test/plugin_npobject_lifetime_test.cc
index 4564506..f493238 100644
--- a/webkit/glue/plugins/test/plugin_npobject_lifetime_test.cc
+++ b/webkit/plugins/npapi/test/plugin_npobject_lifetime_test.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_npobject_lifetime_test.h"
+#include "webkit/plugins/npapi/test/plugin_npobject_lifetime_test.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_npobject_lifetime_test.h b/webkit/plugins/npapi/test/plugin_npobject_lifetime_test.h
index 60d0314..12cf4e2 100644
--- a/webkit/glue/plugins/test/plugin_npobject_lifetime_test.h
+++ b/webkit/plugins/npapi/test/plugin_npobject_lifetime_test.h
@@ -1,12 +1,12 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H__
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H_
#include "build/build_config.h"
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -77,6 +77,6 @@ class NPObjectDeletePluginInNPN_Evaluate : public PluginTest {
DISALLOW_IMPLICIT_CONSTRUCTORS(NPObjectDeletePluginInNPN_Evaluate);
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H__
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_LIFETIME_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_npobject_proxy_test.cc b/webkit/plugins/npapi/test/plugin_npobject_proxy_test.cc
index 5b3a2ca..c9cd27f 100644
--- a/webkit/glue/plugins/test/plugin_npobject_proxy_test.cc
+++ b/webkit/plugins/npapi/test/plugin_npobject_proxy_test.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -9,7 +9,7 @@
#define STRSAFE_NO_DEPRECATE
#include <strsafe.h>
#endif
-#include "webkit/glue/plugins/test/plugin_npobject_proxy_test.h"
+#include "webkit/plugins/npapi/test/plugin_npobject_proxy_test.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_npobject_proxy_test.h b/webkit/plugins/npapi/test/plugin_npobject_proxy_test.h
index 3d14ddb..8585d0f 100644
--- a/webkit/glue/plugins/test/plugin_npobject_proxy_test.h
+++ b/webkit/plugins/npapi/test/plugin_npobject_proxy_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_NPOBJECT_PROXY_TEST_H__
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_NPOBJECT_PROXY_TEST_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_PROXY_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_PROXY_TEST_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -22,6 +22,6 @@ class NPObjectProxyTest : public PluginTest {
virtual NPError SetWindow(NPWindow* pNPWindow);
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_NPOBJECT_PROXY_TEST_H__
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_NPOBJECT_PROXY_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_private_test.cc b/webkit/plugins/npapi/test/plugin_private_test.cc
index cdab7ce..b3aabce 100644
--- a/webkit/glue/plugins/test/plugin_private_test.cc
+++ b/webkit/plugins/npapi/test/plugin_private_test.cc
@@ -1,12 +1,12 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_private_test.h"
+#include "webkit/plugins/npapi/test/plugin_private_test.h"
#include "base/basictypes.h"
#include "base/string_util.h"
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_private_test.h b/webkit/plugins/npapi/test/plugin_private_test.h
index db6b5d1..9079a11 100644
--- a/webkit/glue/plugins/test/plugin_private_test.h
+++ b/webkit/plugins/npapi/test/plugin_private_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_PRIVATE_TEST_H_
-#define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_PRIVATE_TEST_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_PRIVATE_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_PRIVATE_TEST_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -20,6 +20,6 @@ class PrivateTest : public PluginTest {
const char* argv[], NPSavedData* saved);
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_PRIVATE_TEST_H_
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_PRIVATE_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_schedule_timer_test.cc b/webkit/plugins/npapi/test/plugin_schedule_timer_test.cc
index fbfce34..831ab29 100644
--- a/webkit/glue/plugins/test/plugin_schedule_timer_test.cc
+++ b/webkit/plugins/npapi/test/plugin_schedule_timer_test.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_schedule_timer_test.h"
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_schedule_timer_test.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
using base::Time;
diff --git a/webkit/glue/plugins/test/plugin_schedule_timer_test.h b/webkit/plugins/npapi/test/plugin_schedule_timer_test.h
index e3e6505a..043672c 100644
--- a/webkit/glue/plugins/test/plugin_schedule_timer_test.h
+++ b/webkit/plugins/npapi/test/plugin_schedule_timer_test.h
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_SCHEDULE_TIMER_TEST_H
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_SCHEDULE_TIMER_TEST_H
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_SCHEDULE_TIMER_TEST_H
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_SCHEDULE_TIMER_TEST_H
#include "base/at_exit.h"
#include "base/time.h"
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -65,4 +65,4 @@ class ScheduleTimerTest : public PluginTest {
} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_SCHEDULE_TIMER_TEST_H
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_SCHEDULE_TIMER_TEST_H
diff --git a/webkit/glue/plugins/test/plugin_setup_test.cc b/webkit/plugins/npapi/test/plugin_setup_test.cc
index e4c4903..ded1379 100644
--- a/webkit/glue/plugins/test/plugin_setup_test.cc
+++ b/webkit/plugins/npapi/test/plugin_setup_test.cc
@@ -5,7 +5,7 @@
#include "base/basictypes.h"
#include "base/string_util.h"
-#include "webkit/glue/plugins/test/plugin_setup_test.h"
+#include "webkit/plugins/npapi/test/plugin_setup_test.h"
namespace NPAPIClient {
@@ -19,4 +19,4 @@ NPError PluginSetupTest::SetWindow(NPWindow* pNPWindow) {
return NPERR_NO_ERROR;
}
-} // namespace NPAPIClient
+} // namespace NPAPIClient
diff --git a/webkit/glue/plugins/test/plugin_setup_test.h b/webkit/plugins/npapi/test/plugin_setup_test.h
index b01bc42..709b3b1 100644
--- a/webkit/glue/plugins/test/plugin_setup_test.h
+++ b/webkit/plugins/npapi/test/plugin_setup_test.h
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_SETUP_TEST_H__
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_SETUP_TEST_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_SETUP_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_SETUP_TEST_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -19,6 +19,6 @@ class PluginSetupTest : public PluginTest {
virtual NPError SetWindow(NPWindow* pNPWindow);
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_SETUP_TEST_H__
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_SETUP_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_test.cc b/webkit/plugins/npapi/test/plugin_test.cc
index 6717e4b..c948010 100644
--- a/webkit/glue/plugins/test/plugin_test.cc
+++ b/webkit/plugins/npapi/test/plugin_test.cc
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
#include "base/string_util.h"
-#include "webkit/glue/plugins/test/npapi_constants.h"
+#include "webkit/plugins/npapi/test/npapi_constants.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_test.h b/webkit/plugins/npapi/test/plugin_test.h
index f3f8937..fee09d3 100644
--- a/webkit/glue/plugins/test/plugin_test.h
+++ b/webkit/plugins/npapi/test/plugin_test.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H_
-#define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_TEST_H_
#include <string>
@@ -129,6 +129,6 @@ class PluginTest {
bool test_completed_;
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_H_
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_test_factory.cc b/webkit/plugins/npapi/test/plugin_test_factory.cc
index b4ae4f1..779ad00 100644
--- a/webkit/glue/plugins/test/plugin_test_factory.cc
+++ b/webkit/plugins/npapi/test/plugin_test_factory.cc
@@ -2,26 +2,26 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/test/plugin_test_factory.h"
+#include "webkit/plugins/npapi/test/plugin_test_factory.h"
-#include "webkit/glue/plugins/test/plugin_arguments_test.h"
-#include "webkit/glue/plugins/test/plugin_delete_plugin_in_stream_test.h"
-#include "webkit/glue/plugins/test/plugin_get_javascript_url_test.h"
-#include "webkit/glue/plugins/test/plugin_get_javascript_url2_test.h"
-#include "webkit/glue/plugins/test/plugin_geturl_test.h"
-#include "webkit/glue/plugins/test/plugin_javascript_open_popup.h"
-#include "webkit/glue/plugins/test/plugin_new_fails_test.h"
-#include "webkit/glue/plugins/test/plugin_npobject_lifetime_test.h"
-#include "webkit/glue/plugins/test/plugin_npobject_proxy_test.h"
-#include "webkit/glue/plugins/test/plugin_private_test.h"
-#include "webkit/glue/plugins/test/plugin_schedule_timer_test.h"
-#include "webkit/glue/plugins/test/plugin_setup_test.h"
-#include "webkit/glue/plugins/test/plugin_thread_async_call_test.h"
-#include "webkit/glue/plugins/test/plugin_window_size_test.h"
+#include "webkit/plugins/npapi/test/plugin_arguments_test.h"
+#include "webkit/plugins/npapi/test/plugin_delete_plugin_in_stream_test.h"
+#include "webkit/plugins/npapi/test/plugin_get_javascript_url_test.h"
+#include "webkit/plugins/npapi/test/plugin_get_javascript_url2_test.h"
+#include "webkit/plugins/npapi/test/plugin_geturl_test.h"
+#include "webkit/plugins/npapi/test/plugin_javascript_open_popup.h"
+#include "webkit/plugins/npapi/test/plugin_new_fails_test.h"
+#include "webkit/plugins/npapi/test/plugin_npobject_lifetime_test.h"
+#include "webkit/plugins/npapi/test/plugin_npobject_proxy_test.h"
+#include "webkit/plugins/npapi/test/plugin_private_test.h"
+#include "webkit/plugins/npapi/test/plugin_schedule_timer_test.h"
+#include "webkit/plugins/npapi/test/plugin_setup_test.h"
+#include "webkit/plugins/npapi/test/plugin_thread_async_call_test.h"
+#include "webkit/plugins/npapi/test/plugin_window_size_test.h"
#if defined(OS_WIN)
-#include "webkit/glue/plugins/test/plugin_windowed_test.h"
+#include "webkit/plugins/npapi/test/plugin_windowed_test.h"
#endif
-#include "webkit/glue/plugins/test/plugin_windowless_test.h"
+#include "webkit/plugins/npapi/test/plugin_windowless_test.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_test_factory.h b/webkit/plugins/npapi/test/plugin_test_factory.h
index 3fd38d5..f1ed661 100644
--- a/webkit/glue/plugins/test/plugin_test_factory.h
+++ b/webkit/plugins/npapi/test/plugin_test_factory.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_FACTROY_H__
-#define WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_FACTROY_H__
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_TEST_FACTROY_H__
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_TEST_FACTROY_H__
#include <string>
@@ -19,4 +19,4 @@ extern PluginTest* CreatePluginTest(const std::string& test_name,
} // namespace NPAPIClient
-#endif // WEBKIT_PORT_PLUGINS_TEST_PLUGIN_TEST_FACTROY_H__
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_TEST_FACTROY_H__
diff --git a/webkit/glue/plugins/test/plugin_thread_async_call_test.cc b/webkit/plugins/npapi/test/plugin_thread_async_call_test.cc
index c01a49e..e28f84e 100644
--- a/webkit/glue/plugins/test/plugin_thread_async_call_test.cc
+++ b/webkit/plugins/npapi/test/plugin_thread_async_call_test.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/test/plugin_thread_async_call_test.h"
+#include "webkit/plugins/npapi/test/plugin_thread_async_call_test.h"
#include "base/at_exit.h"
#include "base/message_loop.h"
#include "base/thread.h"
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_thread_async_call_test.h b/webkit/plugins/npapi/test/plugin_thread_async_call_test.h
index 78e4e8d..9e6a011 100644
--- a/webkit/glue/plugins/test/plugin_thread_async_call_test.h
+++ b/webkit/plugins/npapi/test/plugin_thread_async_call_test.h
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_THREAD_ASYNC_CALL_TEST_H_
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_THREAD_ASYNC_CALL_TEST_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_THREAD_ASYNC_CALL_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_THREAD_ASYNC_CALL_TEST_H_
#include "base/scoped_ptr.h"
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace base {
class AtExitManager;
@@ -36,4 +36,4 @@ class PluginThreadAsyncCallTest : public PluginTest {
} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_THREAD_ASYNC_CALL_TEST_H_
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_THREAD_ASYNC_CALL_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_window_size_test.cc b/webkit/plugins/npapi/test/plugin_window_size_test.cc
index 9bfabca..abc08ad 100644
--- a/webkit/glue/plugins/test/plugin_window_size_test.cc
+++ b/webkit/plugins/npapi/test/plugin_window_size_test.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_window_size_test.h"
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_window_size_test.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_window_size_test.h b/webkit/plugins/npapi/test/plugin_window_size_test.h
index 3650671..5a49479 100644
--- a/webkit/glue/plugins/test/plugin_window_size_test.h
+++ b/webkit/plugins/npapi/test/plugin_window_size_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_WINDOW_SIZE_TEST_H
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_WINDOW_SIZE_TEST_H
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_WINDOW_SIZE_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_WINDOW_SIZE_TEST_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -19,6 +19,6 @@ class PluginWindowSizeTest : public PluginTest {
virtual NPError SetWindow(NPWindow* pNPWindow);
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_WINDOW_SIZE_TEST_H
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_WINDOW_SIZE_TEST_H_
diff --git a/webkit/glue/plugins/test/plugin_windowed_test.cc b/webkit/plugins/npapi/test/plugin_windowed_test.cc
index c82aa55..5635ec5 100644
--- a/webkit/glue/plugins/test/plugin_windowed_test.cc
+++ b/webkit/plugins/npapi/test/plugin_windowed_test.cc
@@ -1,9 +1,9 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/test/plugin_windowed_test.h"
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_windowed_test.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
namespace NPAPIClient {
diff --git a/webkit/glue/plugins/test/plugin_windowed_test.h b/webkit/plugins/npapi/test/plugin_windowed_test.h
index 949ea86..4906933 100644
--- a/webkit/glue/plugins/test/plugin_windowed_test.h
+++ b/webkit/plugins/npapi/test/plugin_windowed_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_WINDOWED_TEST_H
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_WINDOWED_TEST_H
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_WINDOWED_TEST_H
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_WINDOWED_TEST_H
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -28,6 +28,6 @@ class WindowedPluginTest : public PluginTest {
bool done_;
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_WINDOWED_TEST_H
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_WINDOWED_TEST_H
diff --git a/webkit/glue/plugins/test/plugin_windowless_test.cc b/webkit/plugins/npapi/test/plugin_windowless_test.cc
index aa6a9d7..17b9ca7 100644
--- a/webkit/glue/plugins/test/plugin_windowless_test.cc
+++ b/webkit/plugins/npapi/test/plugin_windowless_test.cc
@@ -5,8 +5,8 @@
#define STRSAFE_NO_DEPRECATE
#include "base/string_number_conversions.h"
#include "base/string_util.h"
-#include "webkit/glue/plugins/test/plugin_windowless_test.h"
-#include "webkit/glue/plugins/test/plugin_client.h"
+#include "webkit/plugins/npapi/test/plugin_windowless_test.h"
+#include "webkit/plugins/npapi/test/plugin_client.h"
#if defined(OS_MACOSX)
#include <ApplicationServices/ApplicationServices.h>
diff --git a/webkit/glue/plugins/test/plugin_windowless_test.h b/webkit/plugins/npapi/test/plugin_windowless_test.h
index f336653..6f5ce15 100644
--- a/webkit/glue/plugins/test/plugin_windowless_test.h
+++ b/webkit/plugins/npapi/test/plugin_windowless_test.h
@@ -1,11 +1,11 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_EXECUTE_SCRIPT_DELETE_TEST_H
-#define WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_EXECUTE_SCRIPT_DELETE_TEST_H
+#ifndef WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_EXECUTE_SCRIPT_DELETE_TEST_H_
+#define WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_EXECUTE_SCRIPT_DELETE_TEST_H_
-#include "webkit/glue/plugins/test/plugin_test.h"
+#include "webkit/plugins/npapi/test/plugin_test.h"
namespace NPAPIClient {
@@ -30,6 +30,6 @@ class WindowlessPluginTest : public PluginTest {
void ConvertPoint(NPNetscapeFuncs* browser);
};
-} // namespace NPAPIClient
+} // namespace NPAPIClient
-#endif // WEBKIT_GLUE_PLUGINS_TEST_PLUGIN_EXECUTE_SCRIPT_DELETE_TEST_H
+#endif // WEBKIT_PLUGINS_NPAPI_TEST_PLUGIN_EXECUTE_SCRIPT_DELETE_TEST_H_
diff --git a/webkit/glue/plugins/test/resource.h b/webkit/plugins/npapi/test/resource.h
index c52fa82..422861f 100644
--- a/webkit/glue/plugins/test/resource.h
+++ b/webkit/plugins/npapi/test/resource.h
@@ -4,7 +4,7 @@
//
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
diff --git a/webkit/glue/plugins/webplugin.cc b/webkit/plugins/npapi/webplugin.cc
index f780e18f..cfe2ff1 100644
--- a/webkit/glue/plugins/webplugin.cc
+++ b/webkit/plugins/npapi/webplugin.cc
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/webplugin.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
WebPluginGeometry::WebPluginGeometry()
: window(gfx::kNullPluginWindow),
@@ -28,4 +29,5 @@ WebPluginDelegate* WebPlugin::delegate() {
return NULL;
}
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin.h b/webkit/plugins/npapi/webplugin.h
index 8a61027..c596949 100644
--- a/webkit/glue/plugins/webplugin.h
+++ b/webkit/plugins/npapi/webplugin.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_WEBPLUGIN_H_
-#define WEBKIT_GLUE_WEBPLUGIN_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_
#include <string>
#include <vector>
@@ -24,7 +24,8 @@ namespace WebKit {
class WebFrame;
}
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
class WebPluginDelegate;
class WebPluginParentView;
@@ -195,6 +196,7 @@ class WebPluginResourceClient {
virtual int ResourceId() = 0;
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_H_
diff --git a/webkit/glue/plugins/webplugin_2d_device_delegate.cc b/webkit/plugins/npapi/webplugin_2d_device_delegate.cc
index f971e20..d5a709e 100644
--- a/webkit/glue/plugins/webplugin_2d_device_delegate.cc
+++ b/webkit/plugins/npapi/webplugin_2d_device_delegate.cc
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/webplugin_2d_device_delegate.h"
+#include "webkit/plugins/npapi/webplugin_2d_device_delegate.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
NPError WebPlugin2DDeviceDelegate::Device2DQueryCapability(int32 capability,
int32* value) {
@@ -50,4 +51,5 @@ NPError WebPlugin2DDeviceDelegate::Device2DDestroyContext(
return NPERR_GENERIC_ERROR;
}
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_2d_device_delegate.h b/webkit/plugins/npapi/webplugin_2d_device_delegate.h
index e18c2fd..094ddc5 100644
--- a/webkit/glue/plugins/webplugin_2d_device_delegate.h
+++ b/webkit/plugins/npapi/webplugin_2d_device_delegate.h
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_2D_DEVICE_DELEGATE_H_
-#define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_2D_DEVICE_DELEGATE_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_2D_DEVICE_DELEGATE_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_2D_DEVICE_DELEGATE_H_
#include "base/basictypes.h"
#include "third_party/npapi/bindings/npapi_extensions.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
// Interface for the NPAPI 2D device extension. This class implements "NOP"
// versions of all these functions so it can be used seamlessly by the
@@ -38,6 +39,7 @@ class WebPlugin2DDeviceDelegate {
virtual ~WebPlugin2DDeviceDelegate() {}
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_2D_DEVICE_DELEGATE_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_2D_DEVICE_DELEGATE_H_
diff --git a/webkit/glue/plugins/webplugin_3d_device_delegate.cc b/webkit/plugins/npapi/webplugin_3d_device_delegate.cc
index 93dffa6..132b6d0 100644
--- a/webkit/glue/plugins/webplugin_3d_device_delegate.cc
+++ b/webkit/plugins/npapi/webplugin_3d_device_delegate.cc
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/webplugin_3d_device_delegate.h"
+#include "webkit/plugins/npapi/webplugin_3d_device_delegate.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
NPError WebPlugin3DDeviceDelegate::Device3DQueryCapability(int32 capability,
int32* value) {
@@ -105,6 +106,6 @@ NPError WebPlugin3DDeviceDelegate::Device3DSynchronizeContext(
return NPERR_GENERIC_ERROR;
}
-
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_3d_device_delegate.h b/webkit/plugins/npapi/webplugin_3d_device_delegate.h
index 2f64b45..45c94aa 100644
--- a/webkit/glue/plugins/webplugin_3d_device_delegate.h
+++ b/webkit/plugins/npapi/webplugin_3d_device_delegate.h
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_3D_DEVICE_DELEGATE_H_
-#define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_3D_DEVICE_DELEGATE_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_3D_DEVICE_DELEGATE_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_3D_DEVICE_DELEGATE_H_
#include "base/basictypes.h"
#include "third_party/npapi/bindings/npapi_extensions.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
// Interface for the NPAPI 3D device extension. This class implements "NOP"
// versions of all these functions so it can be used seamlessly by the
@@ -66,6 +67,7 @@ class WebPlugin3DDeviceDelegate {
virtual ~WebPlugin3DDeviceDelegate() {}
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_3D_DEVICE_DELEGATE_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_3D_DEVICE_DELEGATE_H_
diff --git a/webkit/glue/plugins/webplugin_accelerated_surface_mac.h b/webkit/plugins/npapi/webplugin_accelerated_surface_mac.h
index 13980ca..d26d523 100644
--- a/webkit/glue/plugins/webplugin_accelerated_surface_mac.h
+++ b/webkit/plugins/npapi/webplugin_accelerated_surface_mac.h
@@ -1,9 +1,9 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#ifndef WEBKIT_GLUE_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_
-#define WEBKIT_GLUE_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_
#pragma once
#include "gfx/native_widget_types.h"
@@ -12,7 +12,8 @@
// Avoid having to include OpenGL headers here.
typedef struct _CGLContextObject* CGLContextObj;
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
// Interface class for interacting with an accelerated plugin surface, used
// for the Core Animation flavors of plugin drawing on the Mac.
@@ -39,6 +40,7 @@ class WebPluginAcceleratedSurface {
virtual void EndDrawing() = 0;
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_ACCELERATED_SURFACE_MAC_H_
diff --git a/webkit/glue/plugins/webplugin_audio_device_delegate.cc b/webkit/plugins/npapi/webplugin_audio_device_delegate.cc
index 8cc3d62..0e463c5 100644
--- a/webkit/glue/plugins/webplugin_audio_device_delegate.cc
+++ b/webkit/plugins/npapi/webplugin_audio_device_delegate.cc
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/webplugin_audio_device_delegate.h"
+#include "webkit/plugins/npapi/webplugin_audio_device_delegate.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
NPError WebPluginAudioDeviceDelegate::DeviceAudioQueryCapability(
int32 capability, int32* value) {
@@ -46,5 +47,5 @@ NPError WebPluginAudioDeviceDelegate::DeviceAudioDestroyContext(
return NPERR_GENERIC_ERROR;
}
-
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_audio_device_delegate.h b/webkit/plugins/npapi/webplugin_audio_device_delegate.h
index de85433..c95d206 100644
--- a/webkit/glue/plugins/webplugin_audio_device_delegate.h
+++ b/webkit/plugins/npapi/webplugin_audio_device_delegate.h
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_
-#define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_
#include "base/basictypes.h"
#include "third_party/npapi/bindings/npapi_extensions.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
// Interface for the NPAPI audio device extension. This class implements "NOP"
// versions of all these functions so it can be used seamlessly by the
@@ -36,7 +37,8 @@ class WebPluginAudioDeviceDelegate {
virtual ~WebPluginAudioDeviceDelegate() {}
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_AUDIO_DEVICE_DELEGATE_H_
diff --git a/webkit/glue/plugins/webplugin_delegate.cc b/webkit/plugins/npapi/webplugin_delegate.cc
index c3fb53b..f8ea1cb 100644
--- a/webkit/glue/plugins/webplugin_delegate.cc
+++ b/webkit/plugins/npapi/webplugin_delegate.cc
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/webplugin_delegate.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
bool WebPluginDelegate::StartFind(const string16& search_text,
bool case_sensitive,
@@ -36,5 +37,5 @@ string16 WebPluginDelegate::GetSelectionAsMarkup() const {
return string16();
}
-
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_delegate.h b/webkit/plugins/npapi/webplugin_delegate.h
index ac7bb5c..ff604ed 100644
--- a/webkit/glue/plugins/webplugin_delegate.h
+++ b/webkit/plugins/npapi/webplugin_delegate.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_
-#define WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_
#include <string>
#include <vector>
@@ -14,11 +14,11 @@
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/npapi_extensions.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCanvas.h"
-#include "webkit/glue/plugins/webplugin_2d_device_delegate.h"
-#include "webkit/glue/plugins/webplugin_3d_device_delegate.h"
-#include "webkit/glue/plugins/webplugin_audio_device_delegate.h"
-#include "webkit/glue/plugins/webplugin_file_delegate.h"
-#include "webkit/glue/plugins/webplugin_print_delegate.h"
+#include "webkit/plugins/npapi/webplugin_2d_device_delegate.h"
+#include "webkit/plugins/npapi/webplugin_3d_device_delegate.h"
+#include "webkit/plugins/npapi/webplugin_audio_device_delegate.h"
+#include "webkit/plugins/npapi/webplugin_file_delegate.h"
+#include "webkit/plugins/npapi/webplugin_print_delegate.h"
class FilePath;
class GURL;
@@ -33,7 +33,8 @@ namespace gfx {
class Rect;
}
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
class WebPlugin;
class WebPluginResourceClient;
@@ -161,6 +162,7 @@ class WebPluginDelegate : public WebPlugin2DDeviceDelegate,
virtual string16 GetSelectionAsMarkup() const;
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_WEBPLUGIN_DELEGATE_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_H_
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.cc b/webkit/plugins/npapi/webplugin_delegate_impl.cc
index e3e4f9d..ed80a4d 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl.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/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include <string>
#include <vector>
@@ -13,27 +13,27 @@
#include "base/scoped_ptr.h"
#include "base/string_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_lib.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/plugin_stream_url.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_stream_url.h"
-using webkit_glue::WebPlugin;
-using webkit_glue::WebPluginDelegate;
-using webkit_glue::WebPluginResourceClient;
using WebKit::WebCursorInfo;
using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
+namespace webkit {
+namespace npapi {
+
WebPluginDelegateImpl* WebPluginDelegateImpl::Create(
const FilePath& filename,
const std::string& mime_type,
gfx::PluginWindowHandle containing_view) {
- scoped_refptr<NPAPI::PluginLib> plugin_lib(
- NPAPI::PluginLib::CreatePluginLib(filename));
+ scoped_refptr<PluginLib> plugin_lib(
+ PluginLib::CreatePluginLib(filename));
if (plugin_lib.get() == NULL)
return NULL;
@@ -41,7 +41,7 @@ WebPluginDelegateImpl* WebPluginDelegateImpl::Create(
if (err != NPERR_NO_ERROR)
return NULL;
- scoped_refptr<NPAPI::PluginInstance> instance(
+ scoped_refptr<PluginInstance> instance(
plugin_lib->CreateInstance(mime_type));
return new WebPluginDelegateImpl(containing_view, instance.get());
}
@@ -64,7 +64,7 @@ bool WebPluginDelegateImpl::Initialize(
instance_->set_web_plugin(plugin_);
if (quirks_ & PLUGIN_QUIRK_DONT_ALLOW_MULTIPLE_INSTANCES) {
- NPAPI::PluginLib* plugin_lib = instance()->plugin_lib();
+ PluginLib* plugin_lib = instance()->plugin_lib();
if (plugin_lib->instance_count() > 1) {
return false;
}
@@ -302,3 +302,6 @@ WebPluginResourceClient* WebPluginDelegateImpl::CreateSeekableResourceClient(
unsigned long resource_id, int range_request_id) {
return instance()->GetRangeRequest(range_request_id);
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.h b/webkit/plugins/npapi/webplugin_delegate_impl.h
index 4046c95..6937fe7 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.h
+++ b/webkit/plugins/npapi/webplugin_delegate_impl.h
@@ -2,10 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_DELEGATE_IMPL_H_
-#define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_DELEGATE_IMPL_H_
-
-#include "build/build_config.h"
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_
#include <string>
#include <list>
@@ -15,10 +13,11 @@
#include "base/task.h"
#include "base/time.h"
#include "base/timer.h"
+#include "build/build_config.h"
#include "gfx/native_widget_types.h"
#include "gfx/rect.h"
#include "third_party/npapi/bindings/npapi.h"
-#include "webkit/glue/plugins/webplugin_delegate.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
#include "webkit/glue/webcursor.h"
#if defined(USE_X11)
@@ -29,19 +28,11 @@ typedef struct _GdkDrawable GdkPixmap;
class FilePath;
-namespace NPAPI {
-class PluginInstance;
-}
-
namespace WebKit {
class WebMouseEvent;
}
#if defined(OS_MACOSX)
-class ExternalDragTracker;
-#ifndef NP_NO_QUICKDRAW
-class QuickDrawDrawingManager;
-#endif
#ifdef __OBJC__
@class CALayer;
@class CARenderer;
@@ -49,14 +40,24 @@ class QuickDrawDrawingManager;
class CALayer;
class CARenderer;
#endif
-namespace webkit_glue {
-class WebPluginAcceleratedSurface;
-}
#endif
+namespace webkit {
+namespace npapi {
+
+class PluginInstance;
+
+#if defined(OS_MACOSX)
+class WebPluginAcceleratedSurface;
+class ExternalDragTracker;
+#ifndef NP_NO_QUICKDRAW
+class QuickDrawDrawingManager;
+#endif // NP_NO_QUICKDRAW
+#endif // OS_MACOSX
+
// An implementation of WebPluginDelegate that runs in the plugin process,
// proxied from the renderer by WebPluginDelegateProxy.
-class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
+class WebPluginDelegateImpl : public WebPluginDelegate {
public:
enum PluginQuirks {
PLUGIN_QUIRK_SETWINDOW_TWICE = 1, // Win32
@@ -94,7 +95,7 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
virtual bool Initialize(const GURL& url,
const std::vector<std::string>& arg_names,
const std::vector<std::string>& arg_values,
- webkit_glue::WebPlugin* plugin,
+ WebPlugin* plugin,
bool load_manually);
virtual void PluginDestroyed();
virtual void UpdateGeometry(const gfx::Rect& window_rect,
@@ -121,9 +122,9 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
virtual void DidFinishManualLoading();
virtual void DidManualLoadFail();
virtual void InstallMissingPlugin();
- virtual webkit_glue::WebPluginResourceClient* CreateResourceClient(
+ virtual WebPluginResourceClient* CreateResourceClient(
unsigned long resource_id, const GURL& url, int notify_id);
- virtual webkit_glue::WebPluginResourceClient* CreateSeekableResourceClient(
+ virtual WebPluginResourceClient* CreateSeekableResourceClient(
unsigned long resource_id, int range_request_id);
// End of WebPluginDelegate implementation.
@@ -194,10 +195,10 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
private:
friend class DeleteTask<WebPluginDelegateImpl>;
- friend class webkit_glue::WebPluginDelegate;
+ friend class WebPluginDelegate;
WebPluginDelegateImpl(gfx::PluginWindowHandle containing_view,
- NPAPI::PluginInstance *instance);
+ PluginInstance *instance);
~WebPluginDelegateImpl();
// Called by Initialize() for platform-specific initialization.
@@ -273,7 +274,7 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
bool PlatformHandleInputEvent(const WebKit::WebInputEvent& event,
WebKit::WebCursorInfo* cursor_info);
- NPAPI::PluginInstance* instance() { return instance_.get(); }
+ PluginInstance* instance() { return instance_.get(); }
// Closes down and destroys our plugin instance.
void DestroyInstance();
@@ -292,8 +293,8 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
// used by windowed and windowless plugins
bool windowless_;
- webkit_glue::WebPlugin* plugin_;
- scoped_refptr<NPAPI::PluginInstance> instance_;
+ WebPlugin* plugin_;
+ scoped_refptr<PluginInstance> instance_;
#if defined(OS_WIN)
// Original wndproc before we subclassed.
@@ -429,7 +430,7 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
#endif
CALayer* layer_; // Used for CA drawing mode. Weak, retained by plug-in.
- webkit_glue::WebPluginAcceleratedSurface* surface_; // Weak ref.
+ WebPluginAcceleratedSurface* surface_; // Weak ref.
CARenderer* renderer_; // Renders layer_ to surface_.
scoped_ptr<base::RepeatingTimer<WebPluginDelegateImpl> > redraw_timer_;
@@ -508,4 +509,7 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
DISALLOW_COPY_AND_ASSIGN(WebPluginDelegateImpl);
};
-#endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_DELEGATE_IMPL_H_
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_DELEGATE_IMPL_H_
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc
index 609b41e..ab69e69 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc
@@ -1,8 +1,8 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include <string>
#include <vector>
@@ -20,14 +20,14 @@
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
-#include "webkit/glue/plugins/gtk_plugin_container.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_lib.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/plugin_stream_url.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/plugins/npapi/gtk_plugin_container.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_stream_url.h"
+#include "webkit/plugins/npapi/webplugin.h"
#include "third_party/npapi/bindings/npapi_x11.h"
@@ -36,9 +36,12 @@ using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
+namespace webkit {
+namespace npapi {
+
WebPluginDelegateImpl::WebPluginDelegateImpl(
gfx::PluginWindowHandle containing_view,
- NPAPI::PluginInstance *instance)
+ PluginInstance *instance)
: windowed_handle_(0),
windowed_did_set_window_(false),
windowless_(false),
@@ -765,3 +768,6 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent(
return ret;
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
index 552484a..cf5df05 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_mac.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include <string>
#include <unistd.h>
@@ -19,55 +19,56 @@
#include "base/utf_string_conversions.h"
#include "base/sys_string_conversions.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_lib.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/plugin_stream_url.h"
-#include "webkit/glue/plugins/plugin_web_event_converter_mac.h"
-#include "webkit/glue/plugins/webplugin.h"
-#include "webkit/glue/plugins/webplugin_accelerated_surface_mac.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_stream_url.h"
+#include "webkit/plugins/npapi/plugin_web_event_converter_mac.h"
+#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/plugins/npapi/webplugin_accelerated_surface_mac.h"
#ifndef NP_NO_CARBON
-#include "webkit/glue/plugins/carbon_plugin_window_tracker_mac.h"
+#include "webkit/plugins/npapi/carbon_plugin_window_tracker_mac.h"
#endif
#ifndef NP_NO_QUICKDRAW
-#include "webkit/glue/plugins/quickdraw_drawing_manager_mac.h"
+#include "webkit/plugins/npapi/quickdraw_drawing_manager_mac.h"
#endif
-using webkit_glue::WebPlugin;
-using webkit_glue::WebPluginDelegate;
-using webkit_glue::WebPluginResourceClient;
using WebKit::WebCursorInfo;
using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
using WebKit::WebMouseWheelEvent;
-const int kCoreAnimationRedrawPeriodMs = 10; // 100 Hz
-
// Important implementation notes: The Mac definition of NPAPI, particularly
// the distinction between windowed and windowless modes, differs from the
// Windows and Linux definitions. Most of those differences are
// accomodated by the WebPluginDelegate class.
+namespace webkit {
+namespace npapi {
+
namespace {
+const int kCoreAnimationRedrawPeriodMs = 10; // 100 Hz
+
WebPluginDelegateImpl* g_active_delegate;
// Helper to simplify correct usage of g_active_delegate. Instantiating will
// set the active delegate to |delegate| for the lifetime of the object, then
// NULL when it goes out of scope.
class ScopedActiveDelegate {
-public:
+ public:
explicit ScopedActiveDelegate(WebPluginDelegateImpl* delegate) {
g_active_delegate = delegate;
}
~ScopedActiveDelegate() {
g_active_delegate = NULL;
}
-private:
+
+ private:
DISALLOW_COPY_AND_ASSIGN(ScopedActiveDelegate);
};
@@ -248,7 +249,7 @@ int ExternalDragTracker::WebEventButtonModifierMask() {
WebPluginDelegateImpl::WebPluginDelegateImpl(
gfx::PluginWindowHandle containing_view,
- NPAPI::PluginInstance *instance)
+ PluginInstance *instance)
: windowed_handle_(NULL),
// all Mac plugins are "windowless" in the Windows/X11 sense
windowless_(true),
@@ -568,7 +569,7 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent(
// When an external drag ends, we need to synthesize a MouseEntered.
NPCocoaEvent enter_event = *(static_cast<NPCocoaEvent*>(plugin_event));
enter_event.type = NPCocoaEventMouseEntered;
- NPAPI::ScopedCurrentPluginEvent event_scope(instance(), &enter_event);
+ ScopedCurrentPluginEvent event_scope(instance(), &enter_event);
instance()->NPP_HandleEvent(&enter_event);
}
return false;
@@ -576,9 +577,9 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent(
}
// Send the plugin the event.
- scoped_ptr<NPAPI::ScopedCurrentPluginEvent> event_scope(NULL);
+ scoped_ptr<ScopedCurrentPluginEvent> event_scope(NULL);
if (instance()->event_model() == NPEventModelCocoa) {
- event_scope.reset(new NPAPI::ScopedCurrentPluginEvent(
+ event_scope.reset(new ScopedCurrentPluginEvent(
instance(), static_cast<NPCocoaEvent*>(plugin_event)));
}
int16_t handle_response = instance()->NPP_HandleEvent(plugin_event);
@@ -1143,3 +1144,6 @@ void WebPluginDelegateImpl::SetQuickDrawFastPathEnabled(bool enabled) {
WindowlessPaint(buffer_context_, clip_rect_);
}
#endif // !NP_NO_QUICKDRAW
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc
index e1acba1..4739a9c 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl_win.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/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include <map>
#include <string>
@@ -22,20 +22,23 @@
#include "base/win/windows_version.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
-#include "webkit/glue/plugins/default_plugin_shared.h"
-#include "webkit/glue/plugins/plugin_constants_win.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/plugin_lib.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/plugin_stream_url.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/plugins/npapi/default_plugin_shared.h"
+#include "webkit/plugins/npapi/plugin_constants_win.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/plugin_lib.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_stream_url.h"
+#include "webkit/plugins/npapi/webplugin.h"
using WebKit::WebCursorInfo;
using WebKit::WebKeyboardEvent;
using WebKit::WebInputEvent;
using WebKit::WebMouseEvent;
+namespace webkit {
+namespace npapi {
+
namespace {
const wchar_t kWebPluginDelegateProperty[] = L"WebPluginDelegateProperty";
@@ -181,12 +184,9 @@ std::wstring GetKeyPath(HKEY key) {
} // namespace
bool WebPluginDelegateImpl::IsPluginDelegateWindow(HWND window) {
- // We use a buffer that is one char longer than we need to detect cases where
- // kNativeWindowClassName is a prefix of the given window's class name. It
- // happens that GetClassNameW will just silently truncate the class name to
- // fit into the given buffer.
- wchar_t class_name[arraysize(kNativeWindowClassName) + 1];
- if (!GetClassNameW(window, class_name, arraysize(class_name)))
+ static const int kBufLen = 64;
+ wchar_t class_name[kBufLen];
+ if (!GetClassNameW(window, class_name, kBufLen))
return false;
return wcscmp(class_name, kNativeWindowClassName) == 0;
}
@@ -246,7 +246,7 @@ LRESULT CALLBACK WebPluginDelegateImpl::MouseHookProc(
WebPluginDelegateImpl::WebPluginDelegateImpl(
gfx::PluginWindowHandle containing_view,
- NPAPI::PluginInstance *instance)
+ PluginInstance *instance)
: parent_(containing_view),
instance_(instance),
quirks_(0),
@@ -527,7 +527,7 @@ bool WebPluginDelegateImpl::WindowedCreatePlugin() {
// property. Use an atom so that other processes can access the name of
// the plugin that this window is hosting
if (instance_ != NULL) {
- NPAPI::PluginLib* plugin_lib = instance()->plugin_lib();
+ PluginLib* plugin_lib = instance()->plugin_lib();
if (plugin_lib != NULL) {
std::wstring plugin_name = plugin_lib->plugin_info().name;
if (!plugin_name.empty()) {
@@ -1408,3 +1408,6 @@ void WebPluginDelegateImpl::HandleCaptureForMessage(HWND window,
break;
}
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_file_delegate.cc b/webkit/plugins/npapi/webplugin_file_delegate.cc
index 68c4c60..e110a6b 100644
--- a/webkit/glue/plugins/webplugin_file_delegate.cc
+++ b/webkit/plugins/npapi/webplugin_file_delegate.cc
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/webplugin_file_delegate.h"
+#include "webkit/plugins/npapi/webplugin_file_delegate.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
bool WebPluginFileDelegate::ChooseFile(const char* mime_types,
int mode,
@@ -13,5 +14,6 @@ bool WebPluginFileDelegate::ChooseFile(const char* mime_types,
return false;
}
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_file_delegate.h b/webkit/plugins/npapi/webplugin_file_delegate.h
index ad2bba0..15822af 100644
--- a/webkit/glue/plugins/webplugin_file_delegate.h
+++ b/webkit/plugins/npapi/webplugin_file_delegate.h
@@ -2,13 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_FILE_DELEGATE_H_
-#define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_FILE_DELEGATE_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_FILE_DELEGATE_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_FILE_DELEGATE_H_
#include "base/basictypes.h"
#include "third_party/npapi/bindings/npapi_extensions.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
// Interface for the NPAPI file extensions. This class implements "NOP"
// versions of all these functions so it can be used seamlessly by the
@@ -28,6 +29,7 @@ class WebPluginFileDelegate {
virtual ~WebPluginFileDelegate() {}
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_FILE_DELEGATE_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_FILE_DELEGATE_H_
diff --git a/webkit/glue/plugins/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc
index 666775b..97c2f28 100644
--- a/webkit/glue/plugins/webplugin_impl.cc
+++ b/webkit/plugins/npapi/webplugin_impl.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/glue/plugins/webplugin_impl.h"
+#include "webkit/plugins/npapi/webplugin_impl.h"
#include "base/linked_ptr.h"
#include "base/logging.h"
@@ -39,10 +39,10 @@
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/glue/multipart_response_delegate.h"
-#include "webkit/glue/plugins/plugin_host.h"
-#include "webkit/glue/plugins/plugin_instance.h"
-#include "webkit/glue/plugins/webplugin_delegate.h"
-#include "webkit/glue/plugins/webplugin_page_delegate.h"
+#include "webkit/plugins/npapi/plugin_host.h"
+#include "webkit/plugins/npapi/plugin_instance.h"
+#include "webkit/plugins/npapi/webplugin_delegate.h"
+#include "webkit/plugins/npapi/webplugin_page_delegate.h"
using appcache::WebApplicationCacheHostImpl;
using WebKit::WebCanvas;
@@ -73,7 +73,9 @@ using WebKit::WebVector;
using WebKit::WebView;
using webkit_glue::MultipartResponseDelegate;
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
+
namespace {
// This class handles individual multipart responses. It is instantiated when
@@ -601,7 +603,7 @@ bool WebPluginImpl::SetPostData(WebURLRequest* request,
std::vector<std::string> names;
std::vector<std::string> values;
std::vector<char> body;
- bool rv = NPAPI::PluginHost::SetPostData(buf, length, &names, &values, &body);
+ bool rv = PluginHost::SetPostData(buf, length, &names, &values, &body);
for (size_t i = 0; i < names.size(); ++i) {
request->addHTTPHeaderField(WebString::fromUTF8(names[i]),
@@ -1390,4 +1392,5 @@ WebDevToolsAgent* WebPluginImpl::GetDevToolsAgent() {
return view->devToolsAgent();
}
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_impl.h b/webkit/plugins/npapi/webplugin_impl.h
index 27a692b..c1115dc 100644
--- a/webkit/glue/plugins/webplugin_impl.h
+++ b/webkit/plugins/npapi/webplugin_impl.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_
-#define WEBKIT_GLUE_WEBPLUGIN_IMPL_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IMPL_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IMPL_H_
#include <string>
#include <map>
@@ -21,7 +21,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
-#include "webkit/glue/plugins/webplugin.h"
+#include "webkit/plugins/npapi/webplugin.h"
class WebViewDelegate;
@@ -35,8 +35,12 @@ class WebURLRequest;
}
namespace webkit_glue {
-
class MultipartResponseDelegate;
+} // namespace webkit_glue
+
+namespace webkit {
+namespace npapi {
+
class WebPluginDelegate;
class WebPluginPageDelegate;
@@ -325,6 +329,7 @@ class WebPluginImpl : public WebPlugin,
DISALLOW_COPY_AND_ASSIGN(WebPluginImpl);
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // #ifndef WEBKIT_GLUE_WEBPLUGIN_IMPL_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_IMPL_H_
diff --git a/webkit/glue/plugins/webplugin_impl_unittest.cc b/webkit/plugins/npapi/webplugin_impl_unittest.cc
index e70e39a..45d4ddc 100644
--- a/webkit/glue/plugins/webplugin_impl_unittest.cc
+++ b/webkit/plugins/npapi/webplugin_impl_unittest.cc
@@ -7,21 +7,18 @@
#include "third_party/WebKit/WebKit/chromium/public/WebCString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
-#include "webkit/glue/plugins/webplugin_impl.h"
+#include "webkit/plugins/npapi/webplugin_impl.h"
using WebKit::WebHTTPBody;
using WebKit::WebString;
using WebKit::WebURLRequest;
-using webkit_glue::WebPluginImpl;
-namespace {
-
-class WebPluginImplTest : public testing::Test {
-};
+namespace webkit {
+namespace npapi {
-}
+namespace {
-static std::string GetHeader(const WebURLRequest& request, const char* name) {
+std::string GetHeader(const WebURLRequest& request, const char* name) {
std::string result;
TrimWhitespace(
request.httpHeaderField(WebString::fromUTF8(name)).utf8(),
@@ -30,7 +27,7 @@ static std::string GetHeader(const WebURLRequest& request, const char* name) {
return result;
}
-static std::string GetBodyText(const WebURLRequest& request) {
+std::string GetBodyText(const WebURLRequest& request) {
const WebHTTPBody& body = request.httpBody();
if (body.isNull())
return std::string();
@@ -48,6 +45,8 @@ static std::string GetBodyText(const WebURLRequest& request) {
return result;
}
+} // namespace
+
// The Host functions for NPN_PostURL and NPN_PostURLNotify
// need to parse out some HTTP headers. Make sure it works
// with the following tests
@@ -230,3 +229,6 @@ TEST(WebPluginImplTest, PostParserBodyWithBinaryData) {
EXPECT_EQ(0xFF, (unsigned char)body[2]);
EXPECT_EQ(0xFF, (unsigned char)body[3]);
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_page_delegate.h b/webkit/plugins/npapi/webplugin_page_delegate.h
index d915fdd..15aa730 100644
--- a/webkit/glue/plugins/webplugin_page_delegate.h
+++ b/webkit/plugins/npapi/webplugin_page_delegate.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_WEBPLUGIN_PAGE_DELEGATE_
-#define WEBKIT_GLUE_WEBPLUGIN_PAGE_DELEGATE_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_
#include "gfx/native_widget_types.h"
@@ -14,7 +14,8 @@ namespace WebKit {
class WebCookieJar;
}
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
class WebPluginDelegate;
struct WebPluginGeometry;
@@ -23,7 +24,7 @@ struct WebPluginGeometry;
class WebPluginPageDelegate {
public:
// This method is called to create a WebPluginDelegate implementation when a
- // new plugin is instanced. See webkit_glue::CreateWebPluginDelegateHelper
+ // new plugin is instanced. See CreateWebPluginDelegateHelper
// for a default WebPluginDelegate implementation.
virtual WebPluginDelegate* CreatePluginDelegate(
const FilePath& file_path,
@@ -64,6 +65,7 @@ class WebPluginPageDelegate {
virtual WebKit::WebCookieJar* GetCookieJar() = 0;
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_WEBPLUGIN_PAGE_DELEGATE_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PAGE_DELEGATE_H_
diff --git a/webkit/glue/plugins/webplugin_print_delegate.cc b/webkit/plugins/npapi/webplugin_print_delegate.cc
index 07bf9b8..a90170b 100644
--- a/webkit/glue/plugins/webplugin_print_delegate.cc
+++ b/webkit/plugins/npapi/webplugin_print_delegate.cc
@@ -2,9 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/webplugin_print_delegate.h"
+#include "webkit/plugins/npapi/webplugin_print_delegate.h"
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
bool WebPluginPrintDelegate::PrintSupportsPrintExtension() {
return false;
@@ -23,4 +24,5 @@ bool WebPluginPrintDelegate::PrintPage(int page_number,
void WebPluginPrintDelegate::PrintEnd() {
}
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webplugin_print_delegate.h b/webkit/plugins/npapi/webplugin_print_delegate.h
index 24298e8..7c8ccf4 100644
--- a/webkit/glue/plugins/webplugin_print_delegate.h
+++ b/webkit/plugins/npapi/webplugin_print_delegate.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_WEBPLUGIN_PRINT_DELEGATE_H_
-#define WEBKIT_GLUE_PLUGINS_WEBPLUGIN_PRINT_DELEGATE_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PRINT_DELEGATE_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PRINT_DELEGATE_H_
#include "base/basictypes.h"
#include "third_party/npapi/bindings/npapi_extensions.h"
@@ -13,7 +13,8 @@ namespace gfx {
class Rect;
}
-namespace webkit_glue {
+namespace webkit {
+namespace npapi {
// Interface for the NPAPI print extension. This class implements "NOP"
// versions of all these functions so it can be used seamlessly by the
@@ -37,7 +38,8 @@ class WebPluginPrintDelegate {
virtual ~WebPluginPrintDelegate() {}
};
-} // namespace webkit_glue
+} // namespace npapi
+} // namespace webkit
-#endif // WEBKIT_GLUE_PLUGINS_WEBPLUGIN_PRINT_DELEGATE_H_
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGIN_PRINT_DELEGATE_H_
diff --git a/webkit/glue/plugins/webplugininfo.cc b/webkit/plugins/npapi/webplugininfo.cc
index 7d2b4e4..c055953 100644
--- a/webkit/glue/plugins/webplugininfo.cc
+++ b/webkit/plugins/npapi/webplugininfo.cc
@@ -2,7 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "webkit/glue/plugins/webplugininfo.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
+
+namespace webkit {
+namespace npapi {
WebPluginMimeType::WebPluginMimeType() {}
@@ -42,3 +45,6 @@ WebPluginInfo::WebPluginInfo(const string16& fake_name,
enabled(true) {
}
+} // namespace npapi
+} // namespace webkit
+
diff --git a/webkit/glue/plugins/webplugininfo.h b/webkit/plugins/npapi/webplugininfo.h
index 34eff3d..6b9f240 100644
--- a/webkit/glue/plugins/webplugininfo.h
+++ b/webkit/plugins/npapi/webplugininfo.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_WEBPLUGININFO_H_
-#define WEBKIT_GLUE_WEBPLUGININFO_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBPLUGININFO_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBPLUGININFO_H_
#include <string>
#include <vector>
@@ -11,6 +11,9 @@
#include "base/basictypes.h"
#include "base/file_path.h"
+namespace webkit {
+namespace npapi {
+
// Describes a mime type entry for a plugin.
struct WebPluginMimeType {
WebPluginMimeType();
@@ -57,4 +60,7 @@ struct WebPluginInfo {
bool enabled;
};
-#endif // WEBKIT_GLUE_WEBPLUGININFO_H_
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_WEBPLUGININFO_H_
diff --git a/webkit/glue/plugins/webview_plugin.cc b/webkit/plugins/npapi/webview_plugin.cc
index f89ccb4..6788fc5 100644
--- a/webkit/glue/plugins/webview_plugin.cc
+++ b/webkit/plugins/npapi/webview_plugin.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/glue/plugins/webview_plugin.h"
+#include "webkit/plugins/npapi/webview_plugin.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
@@ -43,6 +43,9 @@ using WebKit::WebURLResponse;
using WebKit::WebVector;
using WebKit::WebView;
+namespace webkit {
+namespace npapi {
+
WebViewPlugin::WebViewPlugin(WebViewPlugin::Delegate* delegate)
: delegate_(delegate),
container_(NULL),
@@ -233,3 +236,6 @@ WebURLError WebViewPlugin::cancelledError(WebFrame* frame,
error.unreachableURL = request.url();
return error;
}
+
+} // namespace npapi
+} // namespace webkit
diff --git a/webkit/glue/plugins/webview_plugin.h b/webkit/plugins/npapi/webview_plugin.h
index f3c75c1..5e2fd20 100644
--- a/webkit/glue/plugins/webview_plugin.h
+++ b/webkit/plugins/npapi/webview_plugin.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_
-#define WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_
+#ifndef WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_
+#define WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_
#include <list>
@@ -22,6 +22,9 @@ class WebMouseEvent;
}
struct WebPreferences;
+namespace webkit {
+namespace npapi {
+
// This class implements the WebPlugin interface by forwarding drawing and
// handling input events to a WebView.
// It can be used as a placeholder for an actual plugin, using HTML for the UI.
@@ -79,8 +82,8 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient,
const WebKit::WebRect& frame_rect, const WebKit::WebRect& clip_rect,
const WebKit::WebVector<WebKit::WebRect>& cut_out_rects, bool is_visible);
- virtual void updateFocus(bool) { }
- virtual void updateVisibility(bool) { }
+ virtual void updateFocus(bool) {}
+ virtual void updateVisibility(bool) {}
virtual bool acceptsInputEvents();
virtual bool handleInputEvent(const WebKit::WebInputEvent& event,
@@ -93,10 +96,10 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient,
// Called in response to WebPluginContainer::loadFrameRequest
virtual void didFinishLoadingFrameRequest(
- const WebKit::WebURL& url, void* notifyData) { }
+ const WebKit::WebURL& url, void* notifyData) {}
virtual void didFailLoadingFrameRequest(const WebKit::WebURL& url,
void* notify_data,
- const WebKit::WebURLError& error) { }
+ const WebKit::WebURLError& error) {}
// WebViewClient methods:
virtual bool acceptsLoadDrops();
@@ -139,4 +142,7 @@ class WebViewPlugin: public WebKit::WebPlugin, public WebKit::WebViewClient,
WebKit::WebString old_title_;
};
-#endif // WEBKIT_GLUE_PLUGINS_WEBVIEW_PLUGIN_H_
+} // namespace npapi
+} // namespace webkit
+
+#endif // WEBKIT_PLUGINS_NPAPI_WEBVIEW_PLUGIN_H_
diff --git a/webkit/plugins/plugin_switches.cc b/webkit/plugins/plugin_switches.cc
index be3342c..e37d416 100644
--- a/webkit/plugins/plugin_switches.cc
+++ b/webkit/plugins/plugin_switches.cc
@@ -12,4 +12,10 @@ const char kEnablePepperTesting[] = "enable-pepper-testing";
// Dumps extra logging about plugin loading to the log file.
const char kDebugPluginLoading[] = "debug-plugin-loading";
+#if defined(OS_WIN)
+// Used by the plugins_test when testing the older WMP plugin to force the new
+// plugin to not get loaded.
+extern const char kUseOldWMPPlugin[] = "use-old-wmp";
+#endif
+
} // namespace switches
diff --git a/webkit/plugins/plugin_switches.h b/webkit/plugins/plugin_switches.h
index 7497ec1..8f5aa3c 100644
--- a/webkit/plugins/plugin_switches.h
+++ b/webkit/plugins/plugin_switches.h
@@ -5,11 +5,17 @@
#ifndef WEBKIT_PLUGINS_PLUGIN_SWITCHES_H_
#define WEBKIT_PLUGINS_PLUGIN_SWITCHES_H_
+#include "build/build_config.h"
+
namespace switches {
extern const char kDebugPluginLoading[];
extern const char kEnablePepperTesting[];
+#if defined(OS_WIN)
+extern const char kUseOldWMPPlugin[];
+#endif
+
} // namespace switches
#endif // WEBKIT_PLUGINS_PLUGIN_SWITCHES_H_
diff --git a/webkit/glue/plugins/url_request_info_unittest.cc b/webkit/plugins/ppapi/url_request_info_unittest.cc
index 341eeb2..341eeb2 100644
--- a/webkit/glue/plugins/url_request_info_unittest.cc
+++ b/webkit/plugins/ppapi/url_request_info_unittest.cc
diff --git a/webkit/support/platform_support_mac.mm b/webkit/support/platform_support_mac.mm
index 7aeb80b..8ff15a7 100644
--- a/webkit/support/platform_support_mac.mm
+++ b/webkit/support/platform_support_mac.mm
@@ -17,7 +17,7 @@
#include "base/string16.h"
#include "grit/webkit_resources.h"
#include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
#import "webkit/support/drt_application_mac.h"
#import "webkit/tools/test_shell/mac/DumpRenderTreePasteboard.h"
@@ -148,7 +148,7 @@ void AfterInitialize(bool unit_test_mode) {
FilePath plugins_dir;
PathService::Get(base::DIR_EXE, &plugins_dir);
plugins_dir = plugins_dir.AppendASCII("../../../plugins");
- NPAPI::PluginList::Singleton()->AddExtraPluginDir(plugins_dir);
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(plugins_dir);
}
void BeforeShutdown() {
diff --git a/webkit/support/test_webplugin_page_delegate.h b/webkit/support/test_webplugin_page_delegate.h
index 95f2b4a..1b4df88 100644
--- a/webkit/support/test_webplugin_page_delegate.h
+++ b/webkit/support/test_webplugin_page_delegate.h
@@ -7,26 +7,27 @@
#include <string>
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
-#include "webkit/glue/plugins/webplugin_page_delegate.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/webplugin_page_delegate.h"
namespace webkit_support {
-class TestWebPluginPageDelegate : public webkit_glue::WebPluginPageDelegate {
+class TestWebPluginPageDelegate : public webkit::npapi::WebPluginPageDelegate {
public:
TestWebPluginPageDelegate() {}
virtual ~TestWebPluginPageDelegate() {}
- virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate(
+ virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
const FilePath& file_path,
const std::string& mime_type) {
// We don't need a valid native window handle in layout tests.
// So just passing 0.
- return WebPluginDelegateImpl::Create(file_path, mime_type, 0);
+ return webkit::npapi::WebPluginDelegateImpl::Create(
+ file_path, mime_type, 0);
}
virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle) {}
virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle) {}
- virtual void DidMovePlugin(const webkit_glue::WebPluginGeometry& move) {}
+ virtual void DidMovePlugin(const webkit::npapi::WebPluginGeometry& move) {}
virtual void DidStartLoadingForPlugin() {}
virtual void DidStopLoadingForPlugin() {}
virtual void ShowModalHTMLDialogForPlugin(
@@ -40,4 +41,5 @@ class TestWebPluginPageDelegate : public webkit_glue::WebPluginPageDelegate {
};
} // namespace webkit_support
+
#endif // WEBKIT_SUPPORT_TEST_WEBPLUGIN_PAGE_DELEGATE_H_
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 26ae930..d088d3c 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -35,13 +35,13 @@
#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
#include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/glue/media/video_renderer_impl.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugin_impl.h"
-#include "webkit/glue/plugins/webplugin_page_delegate.h"
-#include "webkit/glue/plugins/webplugininfo.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitclient_impl.h"
#include "webkit/glue/webmediaplayer_impl.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugin_impl.h"
+#include "webkit/plugins/npapi/webplugin_page_delegate.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
#include "webkit/support/platform_support.h"
#include "webkit/support/test_webplugin_page_delegate.h"
#include "webkit/support/test_webkit_client.h"
@@ -145,14 +145,14 @@ class TestEnvironment {
class WebPluginImplWithPageDelegate
: public webkit_support::TestWebPluginPageDelegate,
public base::SupportsWeakPtr<WebPluginImplWithPageDelegate>,
- public webkit_glue::WebPluginImpl {
+ public webkit::npapi::WebPluginImpl {
public:
WebPluginImplWithPageDelegate(WebFrame* frame,
const WebPluginParams& params,
const FilePath& path,
const std::string& mime_type)
: webkit_support::TestWebPluginPageDelegate(),
- webkit_glue::WebPluginImpl(
+ webkit::npapi::WebPluginImpl(
frame, params, path, mime_type, AsWeakPtr()) {}
virtual ~WebPluginImplWithPageDelegate() {}
private:
@@ -250,9 +250,9 @@ WebKit::WebKitClient* GetWebKitClient() {
WebPlugin* CreateWebPlugin(WebFrame* frame,
const WebPluginParams& params) {
const bool kAllowWildcard = true;
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
std::string actual_mime_type;
- if (!NPAPI::PluginList::Singleton()->GetPluginInfo(
+ if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(
params.url, params.mimeType.utf8(), kAllowWildcard, &info,
&actual_mime_type) || !info.enabled) {
return NULL;
diff --git a/webkit/support/webkit_support_glue.cc b/webkit/support/webkit_support_glue.cc
index 2308a40..85d09db 100644
--- a/webkit/support/webkit_support_glue.cc
+++ b/webkit/support/webkit_support_glue.cc
@@ -7,14 +7,15 @@
#include "base/base_paths.h"
#include "base/path_service.h"
#include "googleurl/src/gurl.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
// Functions needed by webkit_glue.
namespace webkit_glue {
-void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
- NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins);
+void GetPlugins(bool refresh,
+ std::vector<webkit::npapi::WebPluginInfo>* plugins) {
+ webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins);
// Don't load the forked npapi_layout_test_plugin in DRT, we only want to
// use the upstream version TestNetscapePlugIn (on Mac, the upstream version
// is named WebKitTestNetscapePlugIn).
@@ -24,10 +25,10 @@ void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
};
for (int i = plugins->size() - 1; i >= 0; --i) {
- WebPluginInfo plugin_info = plugins->at(i);
+ webkit::npapi::WebPluginInfo plugin_info = plugins->at(i);
for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
- NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path);
+ webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path);
plugins->erase(plugins->begin() + i);
}
}
diff --git a/webkit/tools/test_shell/mac/test_webview_delegate.mm b/webkit/tools/test_shell/mac/test_webview_delegate.mm
index b4e553d..bae33f1 100644
--- a/webkit/tools/test_shell/mac/test_webview_delegate.mm
+++ b/webkit/tools/test_shell/mac/test_webview_delegate.mm
@@ -11,9 +11,9 @@
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webcursor.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#include "webkit/glue/webmenurunner_mac.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include "webkit/tools/test_shell/test_shell.h"
using WebKit::WebCursorInfo;
@@ -168,7 +168,7 @@ void TestWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------
-webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
+webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
const FilePath& path,
const std::string& mime_type) {
WebWidgetHost *host = GetWidgetHost();
@@ -176,7 +176,8 @@ webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
return NULL;
gfx::PluginWindowHandle containing_view = NULL;
- return WebPluginDelegateImpl::Create(path, mime_type, containing_view);
+ return webkit::npapi::WebPluginDelegateImpl::Create(
+ path, mime_type, containing_view);
}
void TestWebViewDelegate::CreatedPluginWindow(
@@ -188,7 +189,7 @@ void TestWebViewDelegate::WillDestroyPluginWindow(
}
void TestWebViewDelegate::DidMovePlugin(
- const webkit_glue::WebPluginGeometry& move) {
+ const webkit::npapi::WebPluginGeometry& move) {
// TODO(port): add me once plugins work.
}
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 280be89..76f3c81 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -11,9 +11,6 @@
#include "base/debug_on_start.h"
#include "base/file_path.h"
#include "base/file_util.h"
-#if defined(OS_MACOSX)
-#include "base/mac_util.h"
-#endif
#include "base/md5.h"
#include "base/message_loop.h"
#include "base/metrics/stats_table.h"
@@ -34,9 +31,6 @@
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/WebKit/WebKit/chromium/public/WebAccessibilityObject.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDeviceOrientationClientMock.h"
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
-#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
-#endif
#include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputControllerMock.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
@@ -49,10 +43,10 @@
#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/glue_serialize.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugininfo.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpreferences.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugininfo.h"
#include "webkit/tools/test_shell/accessibility_controller.h"
#include "webkit/tools/test_shell/notification_presenter.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
@@ -63,6 +57,14 @@
#include "webkit/tools/test_shell/test_shell_switches.h"
#include "webkit/tools/test_shell/test_webview_delegate.h"
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
+#endif
+
+#if defined(OS_MACOSX)
+#include "base/mac_util.h"
+#endif
+
using WebKit::WebCanvas;
using WebKit::WebFrame;
using WebKit::WebNavigationPolicy;
@@ -899,8 +901,9 @@ bool GetFontTable(int fd, uint32_t table, uint8_t* output,
}
#endif
-void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
- NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins);
+void GetPlugins(bool refresh,
+ std::vector<webkit::npapi::WebPluginInfo>* plugins) {
+ webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins);
// Don't load the forked TestNetscapePlugIn in the chromium code, use
// the copy in webkit.org's repository instead.
const FilePath::StringType kPluginBlackList[] = {
@@ -909,10 +912,10 @@ void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
};
for (int i = plugins->size() - 1; i >= 0; --i) {
- WebPluginInfo plugin_info = plugins->at(i);
+ webkit::npapi::WebPluginInfo plugin_info = plugins->at(i);
for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
- NPAPI::PluginList::Singleton()->DisablePlugin(plugin_info.path);
+ webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path);
plugins->erase(plugins->begin() + i);
}
}
diff --git a/webkit/tools/test_shell/test_shell.gypi b/webkit/tools/test_shell/test_shell.gypi
index bec7e53..9ebd278 100644
--- a/webkit/tools/test_shell/test_shell.gypi
+++ b/webkit/tools/test_shell/test_shell.gypi
@@ -400,10 +400,6 @@
'../../glue/media/simple_data_source_unittest.cc',
'../../glue/mimetype_unittest.cc',
'../../glue/multipart_response_delegate_unittest.cc',
- '../../glue/plugins/plugin_group_unittest.cc',
- '../../glue/plugins/plugin_lib_unittest.cc',
- '../../glue/plugins/url_request_info_unittest.cc',
- '../../glue/plugins/webplugin_impl_unittest.cc',
'../../glue/regular_expression_unittest.cc',
'../../glue/resource_fetcher_unittest.cc',
'../../glue/unittest_test_server.h',
@@ -415,12 +411,18 @@
'../../mocks/mock_resource_loader_bridge.h',
'../../mocks/mock_webframe.h',
'../../mocks/mock_weburlloader.h',
+ '../../plugins/npapi/plugin_group_unittest.cc',
+ '../../plugins/npapi/plugin_group_unittest.cc',
+ '../../plugins/npapi/plugin_lib_unittest.cc',
+ '../../plugins/npapi/plugin_lib_unittest.cc',
+ '../../plugins/npapi/webplugin_impl_unittest.cc',
'../../plugins/ppapi/mock_plugin_delegate.cc',
'../../plugins/ppapi/mock_plugin_delegate.h',
'../../plugins/ppapi/mock_resource.h',
'../../plugins/ppapi/ppapi_unittest.cc',
'../../plugins/ppapi/ppapi_unittest.h',
'../../plugins/ppapi/resource_tracker_unittest.cc',
+ '../../plugins/ppapi/url_request_info_unittest.cc',
'../webcore_unit_tests/BMPImageDecoder_unittest.cpp',
'../webcore_unit_tests/ICOImageDecoder_unittest.cpp',
'event_listener_unittest.cc',
@@ -513,13 +515,13 @@
'<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
],
'sources': [
- '../../glue/plugins/test/npapi_constants.cc',
- '../../glue/plugins/test/npapi_constants.h',
- '../../glue/plugins/test/plugin_client.cc',
- '../../glue/plugins/test/plugin_client.h',
- '../../glue/plugins/test/plugin_test.cc',
- '../../glue/plugins/test/plugin_test.h',
- '../../glue/plugins/test/plugin_test_factory.h',
+ '../../plugins/npapi/test/npapi_constants.cc',
+ '../../plugins/npapi/test/npapi_constants.h',
+ '../../plugins/npapi/test/plugin_client.cc',
+ '../../plugins/npapi/test/plugin_client.h',
+ '../../plugins/npapi/test/plugin_test.cc',
+ '../../plugins/npapi/test/plugin_test.h',
+ '../../plugins/npapi/test/plugin_test_factory.h',
],
},
{
@@ -535,51 +537,51 @@
'npapi_test_common',
],
'sources': [
- '../../glue/plugins/test/npapi_test.cc',
- '../../glue/plugins/test/npapi_test.def',
- '../../glue/plugins/test/npapi_test.rc',
- '../../glue/plugins/test/plugin_arguments_test.cc',
- '../../glue/plugins/test/plugin_arguments_test.h',
- '../../glue/plugins/test/plugin_create_instance_in_paint.cc',
- '../../glue/plugins/test/plugin_create_instance_in_paint.h',
- '../../glue/plugins/test/plugin_delete_plugin_in_stream_test.cc',
- '../../glue/plugins/test/plugin_delete_plugin_in_stream_test.h',
- '../../glue/plugins/test/plugin_get_javascript_url_test.cc',
- '../../glue/plugins/test/plugin_get_javascript_url_test.h',
- '../../glue/plugins/test/plugin_get_javascript_url2_test.cc',
- '../../glue/plugins/test/plugin_get_javascript_url2_test.h',
- '../../glue/plugins/test/plugin_geturl_test.cc',
- '../../glue/plugins/test/plugin_geturl_test.h',
- '../../glue/plugins/test/plugin_javascript_open_popup.cc',
- '../../glue/plugins/test/plugin_javascript_open_popup.h',
- '../../glue/plugins/test/plugin_new_fails_test.cc',
- '../../glue/plugins/test/plugin_new_fails_test.h',
- '../../glue/plugins/test/plugin_npobject_lifetime_test.cc',
- '../../glue/plugins/test/plugin_npobject_lifetime_test.h',
- '../../glue/plugins/test/plugin_npobject_proxy_test.cc',
- '../../glue/plugins/test/plugin_npobject_proxy_test.h',
- '../../glue/plugins/test/plugin_schedule_timer_test.cc',
- '../../glue/plugins/test/plugin_schedule_timer_test.h',
- '../../glue/plugins/test/plugin_setup_test.cc',
- '../../glue/plugins/test/plugin_setup_test.h',
- '../../glue/plugins/test/plugin_thread_async_call_test.cc',
- '../../glue/plugins/test/plugin_thread_async_call_test.h',
- '../../glue/plugins/test/plugin_windowed_test.cc',
- '../../glue/plugins/test/plugin_windowed_test.h',
- '../../glue/plugins/test/plugin_private_test.cc',
- '../../glue/plugins/test/plugin_private_test.h',
- '../../glue/plugins/test/plugin_test_factory.cc',
- '../../glue/plugins/test/plugin_window_size_test.cc',
- '../../glue/plugins/test/plugin_window_size_test.h',
- '../../glue/plugins/test/plugin_windowless_test.cc',
- '../../glue/plugins/test/plugin_windowless_test.h',
- '../../glue/plugins/test/resource.h',
+ '../../plugins/npapi/test/npapi_test.cc',
+ '../../plugins/npapi/test/npapi_test.def',
+ '../../plugins/npapi/test/npapi_test.rc',
+ '../../plugins/npapi/test/plugin_arguments_test.cc',
+ '../../plugins/npapi/test/plugin_arguments_test.h',
+ '../../plugins/npapi/test/plugin_create_instance_in_paint.cc',
+ '../../plugins/npapi/test/plugin_create_instance_in_paint.h',
+ '../../plugins/npapi/test/plugin_delete_plugin_in_stream_test.cc',
+ '../../plugins/npapi/test/plugin_delete_plugin_in_stream_test.h',
+ '../../plugins/npapi/test/plugin_get_javascript_url_test.cc',
+ '../../plugins/npapi/test/plugin_get_javascript_url_test.h',
+ '../../plugins/npapi/test/plugin_get_javascript_url2_test.cc',
+ '../../plugins/npapi/test/plugin_get_javascript_url2_test.h',
+ '../../plugins/npapi/test/plugin_geturl_test.cc',
+ '../../plugins/npapi/test/plugin_geturl_test.h',
+ '../../plugins/npapi/test/plugin_javascript_open_popup.cc',
+ '../../plugins/npapi/test/plugin_javascript_open_popup.h',
+ '../../plugins/npapi/test/plugin_new_fails_test.cc',
+ '../../plugins/npapi/test/plugin_new_fails_test.h',
+ '../../plugins/npapi/test/plugin_npobject_lifetime_test.cc',
+ '../../plugins/npapi/test/plugin_npobject_lifetime_test.h',
+ '../../plugins/npapi/test/plugin_npobject_proxy_test.cc',
+ '../../plugins/npapi/test/plugin_npobject_proxy_test.h',
+ '../../plugins/npapi/test/plugin_schedule_timer_test.cc',
+ '../../plugins/npapi/test/plugin_schedule_timer_test.h',
+ '../../plugins/npapi/test/plugin_setup_test.cc',
+ '../../plugins/npapi/test/plugin_setup_test.h',
+ '../../plugins/npapi/test/plugin_thread_async_call_test.cc',
+ '../../plugins/npapi/test/plugin_thread_async_call_test.h',
+ '../../plugins/npapi/test/plugin_windowed_test.cc',
+ '../../plugins/npapi/test/plugin_windowed_test.h',
+ '../../plugins/npapi/test/plugin_private_test.cc',
+ '../../plugins/npapi/test/plugin_private_test.h',
+ '../../plugins/npapi/test/plugin_test_factory.cc',
+ '../../plugins/npapi/test/plugin_window_size_test.cc',
+ '../../plugins/npapi/test/plugin_window_size_test.h',
+ '../../plugins/npapi/test/plugin_windowless_test.cc',
+ '../../plugins/npapi/test/plugin_windowless_test.h',
+ '../../plugins/npapi/test/resource.h',
],
'include_dirs': [
'../../..',
],
'xcode_settings': {
- 'INFOPLIST_FILE': '<(DEPTH)/webkit/glue/plugins/test/Info.plist',
+ 'INFOPLIST_FILE': '<(DEPTH)/webkit/plugins/npapi/test/Info.plist',
},
'conditions': [
['OS!="win"', {
@@ -587,16 +589,16 @@
# TODO(port): Port these.
# plugin_npobject_lifetime_test.cc has win32-isms
# (HWND, CALLBACK).
- '../../glue/plugins/test/plugin_npobject_lifetime_test.cc',
+ '../../plugins/npapi/test/plugin_npobject_lifetime_test.cc',
# The window APIs are necessarily platform-specific.
- '../../glue/plugins/test/plugin_window_size_test.cc',
- '../../glue/plugins/test/plugin_windowed_test.cc',
+ '../../plugins/npapi/test/plugin_window_size_test.cc',
+ '../../plugins/npapi/test/plugin_windowed_test.cc',
# Seems windows specific.
- '../../glue/plugins/test/plugin_create_instance_in_paint.cc',
- '../../glue/plugins/test/plugin_create_instance_in_paint.h',
+ '../../plugins/npapi/test/plugin_create_instance_in_paint.cc',
+ '../../plugins/npapi/test/plugin_create_instance_in_paint.h',
# windows-specific resources
- '../../glue/plugins/test/npapi_test.def',
- '../../glue/plugins/test/npapi_test.rc',
+ '../../plugins/npapi/test/npapi_test.def',
+ '../../plugins/npapi/test/npapi_test.rc',
],
}],
['OS=="mac"', {
@@ -610,7 +612,7 @@
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'sources!': [
# Needs simple event record type porting
- '../../glue/plugins/test/plugin_windowless_test.cc',
+ '../../plugins/npapi/test/plugin_windowless_test.cc',
],
}],
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and (target_arch=="x64" or target_arch=="arm")', {
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index 3f95276..249ccba 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -33,7 +33,7 @@
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webpreferences.h"
-#include "webkit/glue/plugins/plugin_list.h"
+#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/tools/test_shell/mac/test_shell_webview.h"
#include "webkit/tools/test_shell/resource.h"
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
@@ -252,7 +252,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
} else {
plugins_dir = plugins_dir.AppendASCII("plugins");
}
- NPAPI::PluginList::Singleton()->AddExtraPluginDir(plugins_dir);
+ webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(plugins_dir);
}
NSButton* MakeTestButton(NSRect* rect, NSString* title, NSView* parent) {
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 3f72f2c..7bc87e4 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -33,9 +33,6 @@
#include "third_party/WebKit/WebKit/chromium/public/WebFileError.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
-#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
-#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
-#endif
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNode.h"
@@ -59,14 +56,14 @@
#include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/glue/glue_serialize.h"
#include "webkit/glue/media/video_renderer_impl.h"
-#include "webkit/glue/plugins/webplugin_impl.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webmediaplayer_impl.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/window_open_disposition.h"
+#include "webkit/plugins/npapi/webplugin_impl.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include "webkit/tools/test_shell/accessibility_controller.h"
#include "webkit/tools/test_shell/mock_spellcheck.h"
#include "webkit/tools/test_shell/notification_presenter.h"
@@ -77,6 +74,10 @@
#include "webkit/tools/test_shell/test_shell.h"
#include "webkit/tools/test_shell/test_web_worker.h"
+#if defined(ENABLE_CLIENT_BASED_GEOLOCATION)
+#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
+#endif
+
#if defined(OS_WIN)
// TODO(port): make these files work everywhere.
#include "webkit/tools/test_shell/drag_delegate.h"
@@ -711,22 +712,22 @@ WebScreenInfo TestWebViewDelegate::screenInfo() {
// WebFrameClient ------------------------------------------------------------
-WebPlugin* TestWebViewDelegate::createPlugin(
- WebFrame* frame, const WebPluginParams& params) {
+WebPlugin* TestWebViewDelegate::createPlugin(WebFrame* frame,
+ const WebPluginParams& params) {
bool allow_wildcard = true;
- WebPluginInfo info;
+ webkit::npapi::WebPluginInfo info;
std::string actual_mime_type;
- if (!NPAPI::PluginList::Singleton()->GetPluginInfo(
+ if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(
params.url, params.mimeType.utf8(), allow_wildcard, &info,
&actual_mime_type) || !info.enabled)
return NULL;
- return new webkit_glue::WebPluginImpl(
+ return new webkit::npapi::WebPluginImpl(
frame, params, info.path, actual_mime_type, AsWeakPtr());
}
-WebWorker* TestWebViewDelegate::createWorker(
- WebFrame* frame, WebWorkerClient* client) {
+WebWorker* TestWebViewDelegate::createWorker(WebFrame* frame,
+ WebWorkerClient* client) {
return new TestWebWorker();
}
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index f5d81ad..a4de21e 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -9,40 +9,39 @@
#ifndef WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
#define WEBKIT_TOOLS_TEST_SHELL_TEST_WEBVIEW_DELEGATE_H_
-#include "build/build_config.h"
-
-#if defined(OS_WIN)
-#include <windows.h>
-#endif
-
#include <map>
#include <set>
#include <string>
-#if defined(TOOLKIT_USES_GTK)
-#include <gdk/gdkcursor.h>
-#endif
-
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "base/weak_ptr.h"
+#include "build/build_config.h"
#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
-#if defined(OS_MACOSX)
-#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h"
-#endif
#include "third_party/WebKit/WebKit/chromium/public/WebPopupType.h"
#include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h"
#include "webkit/glue/webcursor.h"
-#include "webkit/glue/plugins/webplugin_page_delegate.h"
+#include "webkit/plugins/npapi/webplugin_page_delegate.h"
+#include "webkit/tools/test_shell/mock_spellcheck.h"
+#include "webkit/tools/test_shell/test_navigation_controller.h"
+
+#if defined(OS_MACOSX)
+#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h"
+#endif
+
#if defined(OS_WIN)
+#include <windows.h>
+
#include "webkit/tools/test_shell/drag_delegate.h"
#include "webkit/tools/test_shell/drop_delegate.h"
#endif
-#include "webkit/tools/test_shell/mock_spellcheck.h"
-#include "webkit/tools/test_shell/test_navigation_controller.h"
+
+#if defined(TOOLKIT_USES_GTK)
+#include <gdk/gdkcursor.h>
+#endif
struct WebPreferences;
class GURL;
@@ -60,7 +59,7 @@ struct WebWindowFeatures;
class TestWebViewDelegate : public WebKit::WebViewClient,
public WebKit::WebFrameClient,
- public webkit_glue::WebPluginPageDelegate,
+ public webkit::npapi::WebPluginPageDelegate,
public base::SupportsWeakPtr<TestWebViewDelegate> {
public:
struct CapturedContextMenuEvent {
@@ -239,8 +238,8 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
bool create,
WebKit::WebFileSystemCallbacks* callbacks);
- // webkit_glue::WebPluginPageDelegate
- virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate(
+ // webkit::npapi::WebPluginPageDelegate
+ virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
const FilePath& url,
const std::string& mime_type);
virtual void CreatedPluginWindow(
@@ -248,7 +247,7 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
virtual void WillDestroyPluginWindow(
gfx::PluginWindowHandle handle);
virtual void DidMovePlugin(
- const webkit_glue::WebPluginGeometry& move);
+ const webkit::npapi::WebPluginGeometry& move);
virtual void DidStartLoadingForPlugin() {}
virtual void DidStopLoadingForPlugin() {}
virtual void ShowModalHTMLDialogForPlugin(
diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
index 51cfde3..aff8a45 100644
--- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
@@ -21,15 +21,15 @@
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/gtk_plugin_container_manager.h"
-#include "webkit/glue/plugins/plugin_list.h"
#include "webkit/glue/window_open_disposition.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
+#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include "webkit/tools/test_shell/test_navigation_controller.h"
#include "webkit/tools/test_shell/test_shell.h"
@@ -197,7 +197,7 @@ void TestWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------
-webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
+webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
const FilePath& path,
const std::string& mime_type) {
// TODO(evanm): we probably shouldn't be doing this mapping to X ids at
@@ -205,7 +205,8 @@ webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
GdkNativeWindow plugin_parent =
GDK_WINDOW_XWINDOW(shell_->webViewHost()->view_handle()->window);
- return WebPluginDelegateImpl::Create(path, mime_type, plugin_parent);
+ return webkit::npapi::WebPluginDelegateImpl::Create(
+ path, mime_type, plugin_parent);
}
void TestWebViewDelegate::CreatedPluginWindow(
@@ -219,9 +220,9 @@ void TestWebViewDelegate::WillDestroyPluginWindow(
}
void TestWebViewDelegate::DidMovePlugin(
- const webkit_glue::WebPluginGeometry& move) {
+ const webkit::npapi::WebPluginGeometry& move) {
WebWidgetHost* host = GetWidgetHost();
- GtkPluginContainerManager* plugin_container_manager =
+ webkit::npapi::GtkPluginContainerManager* plugin_container_manager =
static_cast<WebViewHost*>(host)->plugin_container_manager();
plugin_container_manager->MovePluginContainer(move);
}
diff --git a/webkit/tools/test_shell/test_webview_delegate_win.cc b/webkit/tools/test_shell/test_webview_delegate_win.cc
index 64b6a1b..83abf40 100644
--- a/webkit/tools/test_shell/test_webview_delegate_win.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_win.cc
@@ -23,13 +23,13 @@
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
-#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/plugins/plugin_list.h"
-#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#include "webkit/glue/window_open_disposition.h"
+#include "webkit/plugins/npapi/webplugin.h"
+#include "webkit/plugins/npapi/plugin_list.h"
+#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include "webkit/tools/test_shell/drag_delegate.h"
#include "webkit/tools/test_shell/drop_delegate.h"
#include "webkit/tools/test_shell/test_navigation_controller.h"
@@ -133,14 +133,14 @@ void TestWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------
-webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
+webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
const FilePath& path,
const std::string& mime_type) {
HWND hwnd = shell_->webViewHost()->view_handle();
if (!hwnd)
return NULL;
- return WebPluginDelegateImpl::Create(path, mime_type, hwnd);
+ return webkit::npapi::WebPluginDelegateImpl::Create(path, mime_type, hwnd);
}
void TestWebViewDelegate::CreatedPluginWindow(
@@ -154,7 +154,7 @@ void TestWebViewDelegate::WillDestroyPluginWindow(
}
void TestWebViewDelegate::DidMovePlugin(
- const webkit_glue::WebPluginGeometry& move) {
+ const webkit::npapi::WebPluginGeometry& move) {
unsigned long flags = 0;
if (move.rects_valid) {
diff --git a/webkit/tools/test_shell/webview_host.h b/webkit/tools/test_shell/webview_host.h
index 7aade20..7a47ec3 100644
--- a/webkit/tools/test_shell/webview_host.h
+++ b/webkit/tools/test_shell/webview_host.h
@@ -11,7 +11,7 @@
#include "webkit/tools/test_shell/webwidget_host.h"
#if defined(TOOLKIT_USES_GTK)
-#include "webkit/glue/plugins/gtk_plugin_container_manager.h"
+#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
#endif
struct WebPreferences;
@@ -42,7 +42,7 @@ class WebViewHost : public WebWidgetHost {
// Destroy the plugin parent container when a plugin has been destroyed.
void DestroyPluginContainer(gfx::PluginWindowHandle id);
- GtkPluginContainerManager* plugin_container_manager() {
+ webkit::npapi::GtkPluginContainerManager* plugin_container_manager() {
return &plugin_container_manager_;
}
#elif defined(OS_MACOSX)
@@ -58,7 +58,7 @@ class WebViewHost : public WebWidgetHost {
#if defined(TOOLKIT_USES_GTK)
// Helper class that creates and moves plugin containers.
- GtkPluginContainerManager plugin_container_manager_;
+ webkit::npapi::GtkPluginContainerManager plugin_container_manager_;
#endif
};
diff --git a/webkit/tools/test_shell/webview_host_gtk.cc b/webkit/tools/test_shell/webview_host_gtk.cc
index 60b8a81..92a6016 100644
--- a/webkit/tools/test_shell/webview_host_gtk.cc
+++ b/webkit/tools/test_shell/webview_host_gtk.cc
@@ -11,8 +11,8 @@
#include "gfx/size.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
-#include "webkit/glue/plugins/gtk_plugin_container.h"
#include "webkit/glue/webpreferences.h"
+#include "webkit/plugins/npapi/gtk_plugin_container.h"
#include "webkit/tools/test_shell/test_webview_delegate.h"
using WebKit::WebDevToolsAgentClient;