summaryrefslogtreecommitdiffstats
path: root/WebKitTools/DumpRenderTree/win/UIDelegate.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
commit1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch)
tree4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebKitTools/DumpRenderTree/win/UIDelegate.cpp
parent9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff)
downloadexternal_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebKitTools/DumpRenderTree/win/UIDelegate.cpp')
-rwxr-xr-xWebKitTools/DumpRenderTree/win/UIDelegate.cpp46
1 files changed, 41 insertions, 5 deletions
diff --git a/WebKitTools/DumpRenderTree/win/UIDelegate.cpp b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp
index 750e67a..a2532a5 100755
--- a/WebKitTools/DumpRenderTree/win/UIDelegate.cpp
+++ b/WebKitTools/DumpRenderTree/win/UIDelegate.cpp
@@ -26,9 +26,10 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include "DumpRenderTree.h"
+#include "config.h"
#include "UIDelegate.h"
+#include "DumpRenderTree.h"
#include "DraggingInfo.h"
#include "EventSender.h"
#include "LayoutTestController.h"
@@ -38,8 +39,7 @@
#include <wtf/Vector.h>
#include <JavaScriptCore/Assertions.h>
#include <JavaScriptCore/JavaScriptCore.h>
-#include <WebKit/IWebFramePrivate.h>
-#include <WebKit/IWebViewPrivate.h>
+#include <WebKit/WebKit.h>
#include <stdio.h>
using std::wstring;
@@ -322,6 +322,18 @@ HRESULT STDMETHODCALLTYPE UIDelegate::runJavaScriptTextInputPanelWithPrompt(
return S_OK;
}
+HRESULT STDMETHODCALLTYPE UIDelegate::runBeforeUnloadConfirmPanelWithMessage(
+ /* [in] */ IWebView* /*sender*/,
+ /* [in] */ BSTR /*message*/,
+ /* [in] */ IWebFrame* /*initiatedByFrame*/,
+ /* [retval][out] */ BOOL* result)
+{
+ if (!result)
+ return E_POINTER;
+ *result = TRUE;
+ return E_NOTIMPL;
+}
+
HRESULT STDMETHODCALLTYPE UIDelegate::webViewAddMessageToConsole(
/* [in] */ IWebView* sender,
/* [in] */ BSTR message,
@@ -374,13 +386,13 @@ HRESULT STDMETHODCALLTYPE UIDelegate::createWebViewWithRequest(
/* [in] */ IWebURLRequest *request,
/* [retval][out] */ IWebView **newWebView)
{
- if (!::layoutTestController->canOpenWindows())
+ if (!::gLayoutTestController->canOpenWindows())
return E_FAIL;
*newWebView = createWebViewAndOffscreenWindow();
return S_OK;
}
-HRESULT STDMETHODCALLTYPE UIDelegate::webViewClose(
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewClose(
/* [in] */ IWebView *sender)
{
HWND hostWindow;
@@ -389,6 +401,22 @@ HRESULT STDMETHODCALLTYPE UIDelegate::webViewClose(
return S_OK;
}
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewFocus(
+ /* [in] */ IWebView *sender)
+{
+ HWND hostWindow;
+ sender->hostWindow(reinterpret_cast<OLE_HANDLE*>(&hostWindow));
+ SetForegroundWindow(hostWindow);
+ return S_OK;
+}
+
+HRESULT STDMETHODCALLTYPE UIDelegate::webViewUnfocus(
+ /* [in] */ IWebView *sender)
+{
+ SetForegroundWindow(GetDesktopWindow());
+ return S_OK;
+}
+
HRESULT STDMETHODCALLTYPE UIDelegate::webViewPainted(
/* [in] */ IWebView *sender)
{
@@ -406,3 +434,11 @@ HRESULT STDMETHODCALLTYPE UIDelegate::exceededDatabaseQuota(
return S_OK;
}
+
+
+HRESULT STDMETHODCALLTYPE UIDelegate::setStatusText(IWebView*, BSTR text)
+{
+ if (gLayoutTestController->dumpStatusCallbacks())
+ printf("UI DELEGATE STATUS CALLBACK: setStatusText:%S\n", text ? text : L"");
+ return S_OK;
+}