| Index: webkit/tools/test_shell/test_webview_delegate.cc
|
| ===================================================================
|
| --- webkit/tools/test_shell/test_webview_delegate.cc (revision 8043)
|
| +++ webkit/tools/test_shell/test_webview_delegate.cc (working copy)
|
| @@ -29,6 +29,7 @@
|
|
|
| #if defined(OS_WIN)
|
| // TODO(port): make these files work everywhere.
|
| +#include "base/gfx/gdi_util.h"
|
| #include "webkit/glue/plugins/webplugin_delegate_impl.h"
|
| #include "webkit/tools/test_shell/drag_delegate.h"
|
| #include "webkit/tools/test_shell/drop_delegate.h"
|
| @@ -696,11 +697,32 @@
|
| void TestWebViewDelegate::DidMove(WebWidget* webwidget,
|
| const WebPluginGeometry& move) {
|
| #if defined(OS_WIN)
|
| + HRGN hrgn = ::CreateRectRgn(move.clip_rect.x(),
|
| + move.clip_rect.y(),
|
| + move.clip_rect.right(),
|
| + move.clip_rect.bottom());
|
| + gfx::SubtractRectanglesFromRegion(hrgn, move.cutout_rects);
|
| +
|
| + // Note: System will own the hrgn after we call SetWindowRgn,
|
| + // so we don't need to call DeleteObject(hrgn)
|
| + ::SetWindowRgn(move.window, hrgn, FALSE);
|
| +
|
| + unsigned long flags = 0;
|
| + if (move.visible)
|
| + flags |= SWP_SHOWWINDOW;
|
| + else
|
| + flags |= SWP_HIDEWINDOW;
|
| +
|
| + ::SetWindowPos(move.window,
|
| + NULL,
|
| + move.window_rect.x(),
|
| + move.window_rect.y(),
|
| + move.window_rect.width(),
|
| + move.window_rect.height(),
|
| + flags);
|
| +
|
| +#endif
|
| // TODO(port): add me once plugins work.
|
| - WebPluginDelegateImpl::MoveWindow(
|
| - move.window, move.window_rect, move.clip_rect, move.cutout_rects,
|
| - move.visible);
|
| -#endif
|
| }
|
|
|
| bool TestWebViewDelegate::IsHidden() {
|
|
|