summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell
diff options
context:
space:
mode:
authorchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 00:23:26 +0000
committerchase@chromium.org <chase@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-21 00:23:26 +0000
commitc85b0ba71b5a55647b01de9d345e46896979033d (patch)
treeae99657ca1440b7540da473e1bbe6156e43e9be3 /webkit/tools/test_shell
parent887ba3adc7b32b7df315ef292ae9395fd75653e5 (diff)
downloadchromium_src-c85b0ba71b5a55647b01de9d345e46896979033d.zip
chromium_src-c85b0ba71b5a55647b01de9d345e46896979033d.tar.gz
chromium_src-c85b0ba71b5a55647b01de9d345e46896979033d.tar.bz2
Revert "Move the NPAPI files from webkit/glue/plugins to webkit/plugins/npapi"
Manually reverting r69755, which broke the tree. BUG=none TEST=none TBR=dmaclach@chromium.org Review URL: http://codereview.chromium.org/5998002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell')
-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
10 files changed, 129 insertions, 136 deletions
diff --git a/webkit/tools/test_shell/mac/test_webview_delegate.mm b/webkit/tools/test_shell/mac/test_webview_delegate.mm
index bae33f1..b4e553d 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::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
+webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
const FilePath& path,
const std::string& mime_type) {
WebWidgetHost *host = GetWidgetHost();
@@ -176,8 +176,7 @@ webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
return NULL;
gfx::PluginWindowHandle containing_view = NULL;
- return webkit::npapi::WebPluginDelegateImpl::Create(
- path, mime_type, containing_view);
+ return WebPluginDelegateImpl::Create(path, mime_type, containing_view);
}
void TestWebViewDelegate::CreatedPluginWindow(
@@ -189,7 +188,7 @@ void TestWebViewDelegate::WillDestroyPluginWindow(
}
void TestWebViewDelegate::DidMovePlugin(
- const webkit::npapi::WebPluginGeometry& move) {
+ const webkit_glue::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 76f3c81..280be89 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -11,6 +11,9 @@
#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"
@@ -31,6 +34,9 @@
#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"
@@ -43,10 +49,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"
@@ -57,14 +63,6 @@
#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;
@@ -901,9 +899,8 @@ bool GetFontTable(int fd, uint32_t table, uint8_t* output,
}
#endif
-void GetPlugins(bool refresh,
- std::vector<webkit::npapi::WebPluginInfo>* plugins) {
- webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins);
+void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
+ 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[] = {
@@ -912,10 +909,10 @@ void GetPlugins(bool refresh,
FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
};
for (int i = plugins->size() - 1; i >= 0; --i) {
- webkit::npapi::WebPluginInfo plugin_info = plugins->at(i);
+ WebPluginInfo plugin_info = plugins->at(i);
for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
- webkit::npapi::PluginList::Singleton()->DisablePlugin(plugin_info.path);
+ 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 9ebd278..bec7e53 100644
--- a/webkit/tools/test_shell/test_shell.gypi
+++ b/webkit/tools/test_shell/test_shell.gypi
@@ -400,6 +400,10 @@
'../../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',
@@ -411,18 +415,12 @@
'../../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',
@@ -515,13 +513,13 @@
'<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
],
'sources': [
- '../../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',
+ '../../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',
],
},
{
@@ -537,51 +535,51 @@
'npapi_test_common',
],
'sources': [
- '../../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',
+ '../../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',
],
'include_dirs': [
'../../..',
],
'xcode_settings': {
- 'INFOPLIST_FILE': '<(DEPTH)/webkit/plugins/npapi/test/Info.plist',
+ 'INFOPLIST_FILE': '<(DEPTH)/webkit/glue/plugins/test/Info.plist',
},
'conditions': [
['OS!="win"', {
@@ -589,16 +587,16 @@
# TODO(port): Port these.
# plugin_npobject_lifetime_test.cc has win32-isms
# (HWND, CALLBACK).
- '../../plugins/npapi/test/plugin_npobject_lifetime_test.cc',
+ '../../glue/plugins/test/plugin_npobject_lifetime_test.cc',
# The window APIs are necessarily platform-specific.
- '../../plugins/npapi/test/plugin_window_size_test.cc',
- '../../plugins/npapi/test/plugin_windowed_test.cc',
+ '../../glue/plugins/test/plugin_window_size_test.cc',
+ '../../glue/plugins/test/plugin_windowed_test.cc',
# Seems windows specific.
- '../../plugins/npapi/test/plugin_create_instance_in_paint.cc',
- '../../plugins/npapi/test/plugin_create_instance_in_paint.h',
+ '../../glue/plugins/test/plugin_create_instance_in_paint.cc',
+ '../../glue/plugins/test/plugin_create_instance_in_paint.h',
# windows-specific resources
- '../../plugins/npapi/test/npapi_test.def',
- '../../plugins/npapi/test/npapi_test.rc',
+ '../../glue/plugins/test/npapi_test.def',
+ '../../glue/plugins/test/npapi_test.rc',
],
}],
['OS=="mac"', {
@@ -612,7 +610,7 @@
['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
'sources!': [
# Needs simple event record type porting
- '../../plugins/npapi/test/plugin_windowless_test.cc',
+ '../../glue/plugins/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 249ccba..3f95276 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/plugins/npapi/plugin_list.h"
+#include "webkit/glue/plugins/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");
}
- webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(plugins_dir);
+ 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 7bc87e4..3f72f2c 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -33,6 +33,9 @@
#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"
@@ -56,14 +59,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"
@@ -74,10 +77,6 @@
#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"
@@ -712,22 +711,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;
- webkit::npapi::WebPluginInfo info;
+ WebPluginInfo info;
std::string actual_mime_type;
- if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(
+ if (!NPAPI::PluginList::Singleton()->GetPluginInfo(
params.url, params.mimeType.utf8(), allow_wildcard, &info,
&actual_mime_type) || !info.enabled)
return NULL;
- return new webkit::npapi::WebPluginImpl(
+ return new webkit_glue::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 a4de21e..f5d81ad 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -9,39 +9,40 @@
#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"
-#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/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
-
+#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"
#if defined(OS_WIN)
-#include <windows.h>
-
#include "webkit/tools/test_shell/drag_delegate.h"
#include "webkit/tools/test_shell/drop_delegate.h"
#endif
-
-#if defined(TOOLKIT_USES_GTK)
-#include <gdk/gdkcursor.h>
-#endif
+#include "webkit/tools/test_shell/mock_spellcheck.h"
+#include "webkit/tools/test_shell/test_navigation_controller.h"
struct WebPreferences;
class GURL;
@@ -59,7 +60,7 @@ struct WebWindowFeatures;
class TestWebViewDelegate : public WebKit::WebViewClient,
public WebKit::WebFrameClient,
- public webkit::npapi::WebPluginPageDelegate,
+ public webkit_glue::WebPluginPageDelegate,
public base::SupportsWeakPtr<TestWebViewDelegate> {
public:
struct CapturedContextMenuEvent {
@@ -238,8 +239,8 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
bool create,
WebKit::WebFileSystemCallbacks* callbacks);
- // webkit::npapi::WebPluginPageDelegate
- virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
+ // webkit_glue::WebPluginPageDelegate
+ virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate(
const FilePath& url,
const std::string& mime_type);
virtual void CreatedPluginWindow(
@@ -247,7 +248,7 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
virtual void WillDestroyPluginWindow(
gfx::PluginWindowHandle handle);
virtual void DidMovePlugin(
- const webkit::npapi::WebPluginGeometry& move);
+ const webkit_glue::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 aff8a45..51cfde3 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/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/glue/plugins/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::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
+webkit_glue::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,8 +205,7 @@ webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
GdkNativeWindow plugin_parent =
GDK_WINDOW_XWINDOW(shell_->webViewHost()->view_handle()->window);
- return webkit::npapi::WebPluginDelegateImpl::Create(
- path, mime_type, plugin_parent);
+ return WebPluginDelegateImpl::Create(path, mime_type, plugin_parent);
}
void TestWebViewDelegate::CreatedPluginWindow(
@@ -220,9 +219,9 @@ void TestWebViewDelegate::WillDestroyPluginWindow(
}
void TestWebViewDelegate::DidMovePlugin(
- const webkit::npapi::WebPluginGeometry& move) {
+ const webkit_glue::WebPluginGeometry& move) {
WebWidgetHost* host = GetWidgetHost();
- webkit::npapi::GtkPluginContainerManager* plugin_container_manager =
+ 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 83abf40..64b6a1b 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::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
+webkit_glue::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
const FilePath& path,
const std::string& mime_type) {
HWND hwnd = shell_->webViewHost()->view_handle();
if (!hwnd)
return NULL;
- return webkit::npapi::WebPluginDelegateImpl::Create(path, mime_type, hwnd);
+ return WebPluginDelegateImpl::Create(path, mime_type, hwnd);
}
void TestWebViewDelegate::CreatedPluginWindow(
@@ -154,7 +154,7 @@ void TestWebViewDelegate::WillDestroyPluginWindow(
}
void TestWebViewDelegate::DidMovePlugin(
- const webkit::npapi::WebPluginGeometry& move) {
+ const webkit_glue::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 7a47ec3..7aade20 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/plugins/npapi/gtk_plugin_container_manager.h"
+#include "webkit/glue/plugins/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);
- webkit::npapi::GtkPluginContainerManager* plugin_container_manager() {
+ 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.
- webkit::npapi::GtkPluginContainerManager plugin_container_manager_;
+ 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 92a6016..60b8a81 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;