summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools')
-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, 136 insertions, 129 deletions
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;