summaryrefslogtreecommitdiffstats
path: root/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/win/WebCoreSupport/WebContextMenuClient.cpp')
-rw-r--r--WebKit/win/WebCoreSupport/WebContextMenuClient.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
index deabb5c..e42b4cf 100644
--- a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
@@ -26,13 +26,13 @@
#include "config.h"
#include "WebContextMenuClient.h"
-#include "WebDownload.h"
#include "WebElementPropertyBag.h"
#include "WebLocalizableStrings.h"
#include "WebView.h"
#pragma warning(push, 0)
#include <WebCore/ContextMenu.h>
+#include <WebCore/Event.h>
#include <WebCore/FrameLoader.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/Page.h>
@@ -59,11 +59,6 @@ static bool isPreInspectElementTagSafari(IWebUIDelegate* uiDelegate)
if (!uiDelegate)
return false;
- // We assume anyone who implements IWebUIDelegate2 also knows about the Inspect Element item.
- COMPtr<IWebUIDelegate2> uiDelegate2;
- if (SUCCEEDED(uiDelegate->QueryInterface(IID_IWebUIDelegate2, (void**)&uiDelegate2)))
- return false;
-
TCHAR modulePath[MAX_PATH];
DWORD length = ::GetModuleFileName(0, modulePath, _countof(modulePath));
if (!length)
@@ -132,19 +127,7 @@ void WebContextMenuClient::contextMenuItemSelected(ContextMenuItem* item, const
void WebContextMenuClient::downloadURL(const KURL& url)
{
- COMPtr<IWebDownloadDelegate> downloadDelegate;
- if (FAILED(m_webView->downloadDelegate(&downloadDelegate))) {
- // If the WebView doesn't successfully provide a download delegate we'll pass a null one
- // into the WebDownload - which may or may not decide to use a DefaultDownloadDelegate
- LOG_ERROR("Failed to get downloadDelegate from WebView");
- downloadDelegate = 0;
- }
-
- // Its the delegate's job to ref the WebDownload to keep it alive - otherwise it will be destroyed
- // when this method returns
- COMPtr<WebDownload> download;
- download.adoptRef(WebDownload::createInstance(url, downloadDelegate.get()));
- download->start();
+ m_webView->downloadURL(url);
}
void WebContextMenuClient::searchWithGoogle(const Frame* frame)
@@ -160,7 +143,7 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame)
ResourceRequest request = ResourceRequest(url);
if (Page* page = frame->page())
- page->mainFrame()->loader()->urlSelected(FrameLoadRequest(request), 0, false, false);
+ page->mainFrame()->loader()->urlSelected(request, String(), 0, false, false, true);
}
void WebContextMenuClient::lookUpInDictionary(Frame*)
@@ -177,3 +160,9 @@ void WebContextMenuClient::stopSpeaking()
{
notImplemented();
}
+
+bool WebContextMenuClient::isSpeaking()
+{
+ notImplemented();
+ return false;
+}