diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 23:10:56 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 23:10:56 +0000 |
commit | 50285fffa5e44c61cbf6141908c6297fbd0b20d4 (patch) | |
tree | 5fb535a307298d93e4c885c40856303784cbf543 /webkit | |
parent | 1ad795b4c02d1fd42743252685bd411619a2d4e2 (diff) | |
download | chromium_src-50285fffa5e44c61cbf6141908c6297fbd0b20d4.zip chromium_src-50285fffa5e44c61cbf6141908c6297fbd0b20d4.tar.gz chromium_src-50285fffa5e44c61cbf6141908c6297fbd0b20d4.tar.bz2 |
Remove Gears from Chrome.
There are probably a few more bits and pieces that can be removed, but I think this is the majority of it.
BUG=51934
Review URL: http://codereview.chromium.org/6576020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77888 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/extensions/v8/gears_extension.cc | 44 | ||||
-rw-r--r-- | webkit/extensions/v8/gears_extension.h | 23 | ||||
-rw-r--r-- | webkit/glue/webdropdata.cc | 10 | ||||
-rw-r--r-- | webkit/glue/webdropdata.h | 7 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.gypi | 2 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin.h | 8 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_impl.cc | 9 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_impl.h | 3 | ||||
-rw-r--r-- | webkit/plugins/npapi/webplugin_page_delegate.h | 9 | ||||
-rw-r--r-- | webkit/support/test_webkit_client.cc | 3 | ||||
-rw-r--r-- | webkit/support/test_webplugin_page_delegate.h | 5 | ||||
-rw-r--r-- | webkit/tools/test_shell/drop_delegate.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_webkit_init.cc | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.h | 5 |
14 files changed, 4 insertions, 130 deletions
diff --git a/webkit/extensions/v8/gears_extension.cc b/webkit/extensions/v8/gears_extension.cc deleted file mode 100644 index 200135d..0000000 --- a/webkit/extensions/v8/gears_extension.cc +++ /dev/null @@ -1,44 +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. - -#include "webkit/extensions/v8/gears_extension.h" - -namespace extensions_v8 { - -const char* const kGearsExtensionName = "v8/Gears"; - -// Note: when a page touches the "google.gears.factory" object, this script -// touches the DOM. We expect the DOM to be available at that time. -const char* const kGearsExtensionScript = - "var google;" - "if (!google)" - " google = {};" - "if (!google.gears)" - " google.gears = {};" - "(function() {" - " var factory = null;" - " google.gears.__defineGetter__('factory', function() {" - " if (!factory) {" - " factory = document.createElement('object');" - " factory.width = 0;" - " factory.height = 0;" - " factory.style.visibility = 'hidden';" - " factory.type = 'application/x-googlegears';" - " document.documentElement.appendChild(factory);" - " }" - " return factory;" - " });" - "})();"; - -class GearsExtensionWrapper : public v8::Extension { - public: - GearsExtensionWrapper() - : v8::Extension(kGearsExtensionName, kGearsExtensionScript) {} -}; - -v8::Extension* GearsExtension::Get() { - return new GearsExtensionWrapper(); -} - -} // namespace extensions_v8 diff --git a/webkit/extensions/v8/gears_extension.h b/webkit/extensions/v8/gears_extension.h deleted file mode 100644 index cb828438..0000000 --- a/webkit/extensions/v8/gears_extension.h +++ /dev/null @@ -1,23 +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. - -// The GearsExtension is a v8 extension to add a "google.gears.factory" getter -// on the page, which, when accessed, lazily inserts the gears plugin into -// the page and attaches it to the factory variable. - -#ifndef WEBKIT_EXTENSIONS_V8_GEARS_EXTENSION_H_ -#define WEBKIT_EXTENSIONS_V8_GEARS_EXTENSION_H_ - -#include "v8/include/v8.h" - -namespace extensions_v8 { - -class GearsExtension { - public: - static v8::Extension* Get(); -}; - -} // namespace extensions_v8 - -#endif // WEBKIT_EXTENSIONS_V8_GEARS_EXTENSION_H_ diff --git a/webkit/glue/webdropdata.cc b/webkit/glue/webdropdata.cc index 02c1a4c..0a06ac3 100644 --- a/webkit/glue/webdropdata.cc +++ b/webkit/glue/webdropdata.cc @@ -15,13 +15,8 @@ using WebKit::WebDragData; using WebKit::WebString; using WebKit::WebVector; -WebDropData::WebDropData(int32 drag_identity) - : identity(drag_identity) { -} - WebDropData::WebDropData(const WebDragData& drag_data) - : identity(0), - url(drag_data.url()), + : url(drag_data.url()), url_title(drag_data.urlTitle()), download_metadata(drag_data.downloadMetadata()), file_extension(drag_data.fileExtension()), @@ -40,8 +35,7 @@ WebDropData::WebDropData(const WebDragData& drag_data) file_contents.assign(contents.data(), contents.size()); } -WebDropData::WebDropData() - : identity(0) { +WebDropData::WebDropData() { } WebDropData::~WebDropData() { diff --git a/webkit/glue/webdropdata.h b/webkit/glue/webdropdata.h index d129b06..a9a4ae7 100644 --- a/webkit/glue/webdropdata.h +++ b/webkit/glue/webdropdata.h @@ -22,20 +22,13 @@ class WebDragData; } struct WebDropData { - // Construct with a given drag identity. Note: identity is an int32 because - // it is passed over the renderer NPAPI interface to gears. - explicit WebDropData(int32 drag_identity); - // Construct from a WebDragData object. explicit WebDropData(const WebKit::WebDragData&); - // For default constructions, use drag |identity| 0. WebDropData(); ~WebDropData(); - int32 identity; - // User is dragging a link into the webview. GURL url; string16 url_title; // The title associated with |url|. diff --git a/webkit/glue/webkit_glue.gypi b/webkit/glue/webkit_glue.gypi index 1dc4664..74cb61c 100644 --- a/webkit/glue/webkit_glue.gypi +++ b/webkit/glue/webkit_glue.gypi @@ -465,8 +465,6 @@ '../extensions/v8/benchmarking_extension.h', '../extensions/v8/gc_extension.cc', '../extensions/v8/gc_extension.h', - '../extensions/v8/gears_extension.cc', - '../extensions/v8/gears_extension.h', '../extensions/v8/heap_profiler_extension.cc', '../extensions/v8/heap_profiler_extension.h', '../extensions/v8/playback_extension.cc', diff --git a/webkit/plugins/npapi/webplugin.h b/webkit/plugins/npapi/webplugin.h index 9dd1c57..db3b98a 100644 --- a/webkit/plugins/npapi/webplugin.h +++ b/webkit/plugins/npapi/webplugin.h @@ -105,14 +105,6 @@ class WebPlugin { virtual std::string GetCookies(const GURL& url, const GURL& first_party_for_cookies) = 0; - // Shows a modal HTML dialog containing the given URL. json_arguments are - // passed to the dialog via the DOM 'window.chrome.dialogArguments', and the - // retval is the string returned by 'window.chrome.send("DialogClose", - // retval)'. - virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, - const std::string& json_arguments, - std::string* json_retval) = 0; - // When a default plugin has downloaded the plugin list and finds it is // available, it calls this method to notify the renderer. Also it will update // the status when user clicks on the plugin to install. diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc index 51128da..84bc648 100644 --- a/webkit/plugins/npapi/webplugin_impl.cc +++ b/webkit/plugins/npapi/webplugin_impl.cc @@ -780,15 +780,6 @@ std::string WebPluginImpl::GetCookies(const GURL& url, return UTF16ToUTF8(cookie_jar->cookies(url, first_party_for_cookies)); } -void WebPluginImpl::ShowModalHTMLDialog(const GURL& url, int width, int height, - const std::string& json_arguments, - std::string* json_retval) { - if (page_delegate_) { - page_delegate_->ShowModalHTMLDialogForPlugin( - url, gfx::Size(width, height), json_arguments, json_retval); - } -} - void WebPluginImpl::OnMissingPluginStatus(int status) { NOTREACHED(); } diff --git a/webkit/plugins/npapi/webplugin_impl.h b/webkit/plugins/npapi/webplugin_impl.h index 3476a0e..8b7668b 100644 --- a/webkit/plugins/npapi/webplugin_impl.h +++ b/webkit/plugins/npapi/webplugin_impl.h @@ -124,9 +124,6 @@ class WebPluginImpl : public WebPlugin, const std::string& cookie); virtual std::string GetCookies(const GURL& url, const GURL& first_party_for_cookies); - virtual void ShowModalHTMLDialog(const GURL& url, int width, int height, - const std::string& json_arguments, - std::string* json_retval); virtual void OnMissingPluginStatus(int status); virtual void URLRedirectResponse(bool allow, int resource_id); diff --git a/webkit/plugins/npapi/webplugin_page_delegate.h b/webkit/plugins/npapi/webplugin_page_delegate.h index 7cc0200..be6a75a 100644 --- a/webkit/plugins/npapi/webplugin_page_delegate.h +++ b/webkit/plugins/npapi/webplugin_page_delegate.h @@ -52,15 +52,6 @@ class WebPluginPageDelegate { // Notifies the parent view that all loads are finished. virtual void DidStopLoadingForPlugin() = 0; - // Asks the browser to show a modal HTML dialog. The dialog is passed the - // given arguments as a JSON string, and returns its result as a JSON string - // through json_retval. - virtual void ShowModalHTMLDialogForPlugin( - const GURL& url, - const gfx::Size& size, - const std::string& json_arguments, - std::string* json_retval) = 0; - // The WebCookieJar to use for this plugin. virtual WebKit::WebCookieJar* GetCookieJar() = 0; }; diff --git a/webkit/support/test_webkit_client.cc b/webkit/support/test_webkit_client.cc index 7b90dea..c69cf6e 100644 --- a/webkit/support/test_webkit_client.cc +++ b/webkit/support/test_webkit_client.cc @@ -34,7 +34,6 @@ #include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/database/vfs_backend.h" #include "webkit/extensions/v8/gc_extension.h" -#include "webkit/extensions/v8/gears_extension.h" #include "webkit/glue/simple_webmimeregistry_impl.h" #include "webkit/glue/webclipboard_impl.h" #include "webkit/glue/webkit_glue.h" @@ -73,8 +72,6 @@ TestWebKitClient::TestWebKitClient(bool unit_test_mode) WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( WebKit::WebString::fromUTF8("test-shell-resource")); WebScriptController::enableV8SingleThreadMode(); - WebScriptController::registerExtension( - extensions_v8::GearsExtension::Get()); WebKit::WebRuntimeFeatures::enableSockets(true); WebKit::WebRuntimeFeatures::enableApplicationCache(true); WebKit::WebRuntimeFeatures::enableDatabase(true); diff --git a/webkit/support/test_webplugin_page_delegate.h b/webkit/support/test_webplugin_page_delegate.h index 035f335..94b571e 100644 --- a/webkit/support/test_webplugin_page_delegate.h +++ b/webkit/support/test_webplugin_page_delegate.h @@ -25,11 +25,6 @@ class TestWebPluginPageDelegate : public webkit::npapi::WebPluginPageDelegate { virtual void DidMovePlugin(const webkit::npapi::WebPluginGeometry& move) {} virtual void DidStartLoadingForPlugin() {} virtual void DidStopLoadingForPlugin() {} - virtual void ShowModalHTMLDialogForPlugin( - const GURL& url, - const gfx::Size& size, - const std::string& json_arguments, - std::string* json_retval) {} virtual WebKit::WebCookieJar* GetCookieJar(); }; diff --git a/webkit/tools/test_shell/drop_delegate.cc b/webkit/tools/test_shell/drop_delegate.cc index 9fbf364..247f38f 100644 --- a/webkit/tools/test_shell/drop_delegate.cc +++ b/webkit/tools/test_shell/drop_delegate.cc @@ -29,7 +29,7 @@ DWORD TestDropDelegate::OnDragEnter(IDataObject* data_object, POINT client_pt = cursor_position; ScreenToClient(GetHWND(), &client_pt); WebDragOperation op = webview_->dragTargetDragEnter( - drop_data.ToDragData(), drop_data.identity, + drop_data.ToDragData(), 0, // web drag identity, unused. WebPoint(client_pt.x, client_pt.y), WebPoint(cursor_position.x, cursor_position.y), WebDragOperationCopy); diff --git a/webkit/tools/test_shell/test_shell_webkit_init.cc b/webkit/tools/test_shell/test_shell_webkit_init.cc index 274ad63..c986531 100644 --- a/webkit/tools/test_shell/test_shell_webkit_init.cc +++ b/webkit/tools/test_shell/test_shell_webkit_init.cc @@ -13,7 +13,7 @@ #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h" -#include "webkit/extensions/v8/gears_extension.h" +#include "v8/include/v8.h" #include "webkit/tools/test_shell/test_shell.h" #if defined(OS_WIN) @@ -30,8 +30,6 @@ TestShellWebKitInit::TestShellWebKitInit(bool layout_test_mode) { WebKit::WebSecurityPolicy::registerURLSchemeAsNoAccess( WebKit::WebString::fromUTF8("test-shell-resource")); WebKit::WebScriptController::enableV8SingleThreadMode(); - WebKit::WebScriptController::registerExtension( - extensions_v8::GearsExtension::Get()); WebKit::WebRuntimeFeatures::enableSockets(true); WebKit::WebRuntimeFeatures::enableApplicationCache(true); WebKit::WebRuntimeFeatures::enableDatabase(true); diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index 9b8feee..a0c7543 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -247,11 +247,6 @@ class TestWebViewDelegate : public WebKit::WebViewClient, const webkit::npapi::WebPluginGeometry& move); virtual void DidStartLoadingForPlugin() {} virtual void DidStopLoadingForPlugin() {} - virtual void ShowModalHTMLDialogForPlugin( - const GURL& url, - const gfx::Size& size, - const std::string& json_arguments, - std::string* json_retval) {} virtual WebKit::WebCookieJar* GetCookieJar(); TestWebViewDelegate(TestShell* shell); |