summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rw-r--r--chrome/browser/metrics/metrics_log.h2
-rw-r--r--chrome/browser/plugin_process_host.h2
-rw-r--r--chrome/browser/plugin_service.h3
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc2
-rw-r--r--chrome/common/render_messages.h1
-rw-r--r--webkit/build/WebKit/WebKit.vcproj12
-rw-r--r--webkit/glue/chromium_bridge_impl.cc37
-rw-r--r--webkit/glue/glue.vcproj4
-rw-r--r--webkit/glue/glue_util.h3
-rw-r--r--webkit/glue/plugins/plugin_host.cc2
-rw-r--r--webkit/glue/plugins/plugin_list.h2
-rw-r--r--webkit/glue/simple_webmimeregistry_impl.cc1
-rw-r--r--webkit/glue/webkitclient_impl.cc36
-rw-r--r--webkit/glue/webkitclient_impl.h1
-rw-r--r--webkit/glue/webplugin.h32
-rw-r--r--webkit/glue/webplugininfo.h44
-rwxr-xr-xwebkit/tools/test_shell/test_webview_delegate_gtk.cc1
-rwxr-xr-xwebkit/tools/test_shell/test_webview_delegate_win.cc1
-rw-r--r--webkit/webkit.gyp4
20 files changed, 112 insertions, 80 deletions
diff --git a/DEPS b/DEPS
index 5a35a13..d4c9775 100644
--- a/DEPS
+++ b/DEPS
@@ -19,7 +19,7 @@ deps = {
"http://googletest.googlecode.com/svn/trunk@214",
"src/third_party/WebKit":
- "/trunk/deps/third_party/WebKit@14377",
+ "/trunk/deps/third_party/WebKit@14437",
"src/third_party/icu38":
"/trunk/deps/third_party/icu38@13472",
diff --git a/chrome/browser/metrics/metrics_log.h b/chrome/browser/metrics/metrics_log.h
index fc0eb7a..a243ce1 100644
--- a/chrome/browser/metrics/metrics_log.h
+++ b/chrome/browser/metrics/metrics_log.h
@@ -17,7 +17,7 @@
#include "base/histogram.h"
#include "base/time.h"
#include "chrome/common/page_transition_types.h"
-#include "webkit/glue/webplugin.h"
+#include "webkit/glue/webplugininfo.h"
struct AutocompleteLog;
class DictionaryValue;
diff --git a/chrome/browser/plugin_process_host.h b/chrome/browser/plugin_process_host.h
index a326bee..46d5e74 100644
--- a/chrome/browser/plugin_process_host.h
+++ b/chrome/browser/plugin_process_host.h
@@ -18,7 +18,7 @@
#include "chrome/browser/net/resolve_proxy_msg_helper.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
#include "chrome/common/child_process_host.h"
-#include "webkit/glue/webplugin.h"
+#include "webkit/glue/webplugininfo.h"
class URLRequestContext;
struct ViewHostMsg_Resource_Request;
diff --git a/chrome/browser/plugin_service.h b/chrome/browser/plugin_service.h
index 3c8adae..883953c 100644
--- a/chrome/browser/plugin_service.h
+++ b/chrome/browser/plugin_service.h
@@ -17,7 +17,7 @@
#include "base/singleton.h"
#include "base/waitable_event_watcher.h"
#include "chrome/browser/browser_process.h"
-#include "webkit/glue/webplugin.h"
+#include "webkit/glue/webplugininfo.h"
#if defined(OS_WIN)
#include "base/registry.h"
@@ -27,6 +27,7 @@ namespace IPC {
class Message;
}
+class GURL;
class MessageLoop;
class PluginProcessHost;
class URLRequestContext;
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index b528819..aee7604 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -765,7 +765,7 @@ void ResourceMessageFilter::OnSpellCheck(const std::wstring& word,
}
ViewHostMsg_SpellCheck::WriteReplyParams(reply_msg, misspell_location,
- misspell_length);
+ misspell_length);
Send(reply_msg);
return;
}
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 624dc0b..f711cf6 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -36,6 +36,7 @@
#include "webkit/glue/webappcachecontext.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webplugin.h"
+#include "webkit/glue/webplugininfo.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webview_delegate.h"
diff --git a/webkit/build/WebKit/WebKit.vcproj b/webkit/build/WebKit/WebKit.vcproj
index d0abe86..b9eb133 100644
--- a/webkit/build/WebKit/WebKit.vcproj
+++ b/webkit/build/WebKit/WebKit.vcproj
@@ -184,6 +184,10 @@
>
</File>
<File
+ RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\WebPluginListBuilder.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\WebPoint.h"
>
</File>
@@ -280,6 +284,14 @@
>
</File>
<File
+ RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\src\WebPluginListBuilderImpl.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\src\WebPluginListBuilderImpl.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\src\WebString.cpp"
>
</File>
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc
index c094d94..471a342 100644
--- a/webkit/glue/chromium_bridge_impl.cc
+++ b/webkit/glue/chromium_bridge_impl.cc
@@ -106,43 +106,6 @@ void ChromiumBridge::notifyJSOutOfMemory(Frame* frame) {
// Plugin ---------------------------------------------------------------------
-bool ChromiumBridge::plugins(bool refresh, Vector<PluginInfo*>* results) {
- std::vector<WebPluginInfo> glue_plugins;
- if (!webkit_glue::GetPlugins(refresh, &glue_plugins))
- return false;
- for (size_t i = 0; i < glue_plugins.size(); ++i) {
- PluginInfo* rv = new PluginInfo;
- const WebPluginInfo& plugin = glue_plugins[i];
- rv->name = webkit_glue::StdWStringToString(plugin.name);
- rv->desc = webkit_glue::StdWStringToString(plugin.desc);
- rv->file =
-#if defined(OS_WIN)
- webkit_glue::StdWStringToString(plugin.path.BaseName().value());
-#elif defined(OS_POSIX)
- webkit_glue::StdStringToString(plugin.path.BaseName().value());
-#endif
- for (size_t j = 0; j < plugin.mime_types.size(); ++ j) {
- MimeClassInfo* new_mime = new MimeClassInfo();
- const WebPluginMimeType& mime_type = plugin.mime_types[j];
- new_mime->desc = webkit_glue::StdWStringToString(mime_type.description);
-
- for (size_t k = 0; k < mime_type.file_extensions.size(); ++k) {
- if (new_mime->suffixes.length())
- new_mime->suffixes.append(",");
-
- new_mime->suffixes.append(webkit_glue::StdStringToString(
- mime_type.file_extensions[k]));
- }
-
- new_mime->type = webkit_glue::StdStringToString(mime_type.mime_type);
- new_mime->plugin = rv;
- rv->mimes.append(new_mime);
- }
- results->append(rv);
- }
- return true;
-}
-
NPObject* ChromiumBridge::pluginScriptableObject(Widget* widget) {
if (!widget)
return NULL;
diff --git a/webkit/glue/glue.vcproj b/webkit/glue/glue.vcproj
index 8074600..0677fbb 100644
--- a/webkit/glue/glue.vcproj
+++ b/webkit/glue/glue.vcproj
@@ -242,6 +242,10 @@
>
</File>
<File
+ RelativePath=".\webplugininfo.h"
+ >
+ </File>
+ <File
RelativePath=".\webpreferences.h"
>
</File>
diff --git a/webkit/glue/glue_util.h b/webkit/glue/glue_util.h
index 46cc74a..4bcebad 100644
--- a/webkit/glue/glue_util.h
+++ b/webkit/glue/glue_util.h
@@ -71,9 +71,6 @@ WebCore::CString WebCStringToCString(const WebKit::WebCString& str);
FilePath::StringType StringToFilePathString(const WebCore::String& str);
WebCore::String FilePathStringToString(const FilePath::StringType& str);
-FilePath::StringType WebStringToFilePathString(const WebKit::WebString& str);
-WebKit::WebString FilePathStringToWebString(const FilePath::StringType& str);
-
GURL KURLToGURL(const WebCore::KURL& url);
WebCore::KURL GURLToKURL(const GURL& url);
GURL StringToGURL(const WebCore::String& spec);
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc
index bfefd0b..a349e43 100644
--- a/webkit/glue/plugins/plugin_host.cc
+++ b/webkit/glue/plugins/plugin_host.cc
@@ -26,7 +26,7 @@
#include "net/base/net_util.h"
#include "webkit/default_plugin/default_plugin_shared.h"
#include "webkit/glue/glue_util.h"
-#include "webkit/glue/webplugin.h"
+#include "webkit/glue/webplugininfo.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/plugins/plugin_instance.h"
#include "webkit/glue/plugins/plugin_lib.h"
diff --git a/webkit/glue/plugins/plugin_list.h b/webkit/glue/plugins/plugin_list.h
index d2d14d1..9faf899 100644
--- a/webkit/glue/plugins/plugin_list.h
+++ b/webkit/glue/plugins/plugin_list.h
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
-#include "webkit/glue/webplugin.h"
+#include "webkit/glue/webplugininfo.h"
#include "webkit/glue/plugins/nphostapi.h"
class GURL;
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc
index 1d6ebed..4a2fd8c 100644
--- a/webkit/glue/simple_webmimeregistry_impl.cc
+++ b/webkit/glue/simple_webmimeregistry_impl.cc
@@ -9,6 +9,7 @@
#include "net/base/mime_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "webkit/glue/glue_util.h"
+#include "webkit/glue/webkit_glue.h"
using WebKit::WebString;
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 9c916b6..cdf4191 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -6,12 +6,17 @@
#include "base/message_loop.h"
#include "base/stats_counters.h"
+#include "base/string_util.h"
#include "base/trace_event.h"
#include "grit/webkit_resources.h"
#include "third_party/WebKit/WebKit/chromium/public/WebData.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebPluginListBuilder.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "webkit/glue/webkit_glue.h"
+#include "webkit/glue/webplugininfo.h"
using WebKit::WebData;
+using WebKit::WebPluginListBuilder;
using WebKit::WebThemeEngine;
namespace webkit_glue {
@@ -29,6 +34,35 @@ WebThemeEngine* WebKitClientImpl::themeEngine() {
#endif
}
+void WebKitClientImpl::getPluginList(bool refresh,
+ WebPluginListBuilder* builder) {
+ std::vector<WebPluginInfo> plugins;
+ if (!GetPlugins(refresh, &plugins))
+ return;
+
+ for (size_t i = 0; i < plugins.size(); ++i) {
+ const WebPluginInfo& plugin = plugins[i];
+
+ builder->addPlugin(
+ WideToUTF16Hack(plugin.name),
+ WideToUTF16Hack(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];
+
+ builder->addMediaTypeToLastPlugin(
+ UTF8ToUTF16(mime_type.mime_type),
+ WideToUTF16Hack(mime_type.description));
+
+ for (size_t k = 0; k < mime_type.file_extensions.size(); ++k) {
+ builder->addFileExtensionToLastMediaType(
+ UTF8ToUTF16(mime_type.file_extensions[k]));
+ }
+ }
+ }
+}
+
void WebKitClientImpl::decrementStatsCounter(const char* name) {
StatsCounter(name).Decrement();
}
@@ -69,7 +103,7 @@ WebData WebKitClientImpl::loadResource(const char* name) {
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resources); ++i) {
if (!strcmp(name, resources[i].name)) {
- StringPiece resource = webkit_glue::GetDataResource(resources[i].id);
+ StringPiece resource = GetDataResource(resources[i].id);
return WebData(resource.data(), resource.size());
}
}
diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h
index 3e7b1ab..6604021 100644
--- a/webkit/glue/webkitclient_impl.h
+++ b/webkit/glue/webkitclient_impl.h
@@ -21,6 +21,7 @@ class WebKitClientImpl : public WebKit::WebKitClient {
// WebKitClient methods (partial implementation):
virtual WebKit::WebThemeEngine* themeEngine();
+ virtual void getPluginList(bool refresh, WebKit::WebPluginListBuilder*);
virtual void decrementStatsCounter(const char* name);
virtual void incrementStatsCounter(const char* name);
virtual void traceEventBegin(const char* name, void* id, const char* extra);
diff --git a/webkit/glue/webplugin.h b/webkit/glue/webplugin.h
index 64791ea..682e138 100644
--- a/webkit/glue/webplugin.h
+++ b/webkit/glue/webplugin.h
@@ -24,38 +24,6 @@ class WebPluginResourceClient;
struct NPObject;
-// Describes a mime type entry for a plugin.
-struct WebPluginMimeType {
- // The actual mime type.
- std::string mime_type;
-
- // A list of all the file extensions for this mime type.
- std::vector<std::string> file_extensions;
-
- // Description of the mime type.
- std::wstring description;
-};
-
-
-// Describes an available NPAPI plugin.
-struct WebPluginInfo {
- // The name of the plugin (i.e. Flash).
- std::wstring name;
-
- // The path to the plugin file (DLL/bundle/library).
- FilePath path;
-
- // The version number of the plugin file (may be OS-specific)
- std::wstring version;
-
- // A description of the plugin that we get from its version info.
- std::wstring desc;
-
- // A list of all the mime types that this plugin supports.
- std::vector<WebPluginMimeType> mime_types;
-};
-
-
// Describes the new location for a plugin window.
struct WebPluginGeometry {
gfx::NativeView window;
diff --git a/webkit/glue/webplugininfo.h b/webkit/glue/webplugininfo.h
new file mode 100644
index 0000000..77c59ea
--- /dev/null
+++ b/webkit/glue/webplugininfo.h
@@ -0,0 +1,44 @@
+// 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.
+
+#ifndef WEBKIT_GLUE_WEBPLUGININFO_H_
+#define WEBKIT_GLUE_WEBPLUGININFO_H_
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "base/file_path.h"
+
+// Describes a mime type entry for a plugin.
+struct WebPluginMimeType {
+ // The name of the mime type (e.g., "application/x-shockwave-flash").
+ std::string mime_type;
+
+ // A list of all the file extensions for this mime type.
+ std::vector<std::string> file_extensions;
+
+ // Description of the mime type.
+ std::wstring description;
+};
+
+// Describes an available NPAPI plugin.
+struct WebPluginInfo {
+ // The name of the plugin (i.e. Flash).
+ std::wstring name;
+
+ // The path to the plugin file (DLL/bundle/library).
+ FilePath path;
+
+ // The version number of the plugin file (may be OS-specific)
+ std::wstring version;
+
+ // A description of the plugin that we get from its version info.
+ std::wstring desc;
+
+ // A list of all the mime types that this plugin supports.
+ std::vector<WebPluginMimeType> mime_types;
+};
+
+#endif // WEBKIT_GLUE_WEBPLUGININFO_H_
diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
index e3df8f4..5062c7c 100755
--- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
@@ -21,6 +21,7 @@
#include "webkit/glue/weberror.h"
#include "webkit/glue/webframe.h"
#include "webkit/glue/webpreferences.h"
+#include "webkit/glue/webplugin.h"
#include "webkit/glue/weburlrequest.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webview.h"
diff --git a/webkit/tools/test_shell/test_webview_delegate_win.cc b/webkit/tools/test_shell/test_webview_delegate_win.cc
index b06b1ec..f16c766 100755
--- a/webkit/tools/test_shell/test_webview_delegate_win.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_win.cc
@@ -25,6 +25,7 @@
#include "webkit/glue/weberror.h"
#include "webkit/glue/webframe.h"
#include "webkit/glue/webpreferences.h"
+#include "webkit/glue/webplugin.h"
#include "webkit/glue/weburlrequest.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webview.h"
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index c731ff732..954fe6a 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -4172,6 +4172,7 @@
'../third_party/WebKit/WebKit/chromium/public/WebKit.h',
'../third_party/WebKit/WebKit/chromium/public/WebKitClient.h',
'../third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h',
+ '../third_party/WebKit/WebKit/chromium/public/WebPluginListBuilder.h',
'../third_party/WebKit/WebKit/chromium/public/WebPoint.h',
'../third_party/WebKit/WebKit/chromium/public/WebRect.h',
'../third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h',
@@ -4198,6 +4199,8 @@
'../third_party/WebKit/WebKit/chromium/src/WebImageSkia.cpp',
'../third_party/WebKit/WebKit/chromium/src/WebInputEvent.cpp',
'../third_party/WebKit/WebKit/chromium/src/WebKit.cpp',
+ '../third_party/WebKit/WebKit/chromium/src/WebPluginListBuilderImpl.cpp',
+ '../third_party/WebKit/WebKit/chromium/src/WebPluginListBuilderImpl.h',
'../third_party/WebKit/WebKit/chromium/src/WebString.cpp',
'../third_party/WebKit/WebKit/chromium/src/WebURL.cpp',
'../third_party/WebKit/WebKit/chromium/src/win/WebInputEventFactory.cpp',
@@ -4476,6 +4479,7 @@
'glue/webplugin_delegate.h',
'glue/webplugin_impl.cc',
'glue/webplugin_impl.h',
+ 'glue/webplugininfo.h',
'glue/webpreferences.h',
'glue/webresponse.h',
'glue/webresponse_impl.h',