OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file contains the implementation of TestWebViewDelegate, which serves | 5 // This file contains the implementation of TestWebViewDelegate, which serves |
6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to | 6 // as the WebViewDelegate for the TestShellWebHost. The host is expected to |
7 // have initialized a MessageLoop before these methods are called. | 7 // have initialized a MessageLoop before these methods are called. |
8 | 8 |
9 #include "webkit/tools/test_shell/test_webview_delegate.h" | 9 #include "webkit/tools/test_shell/test_webview_delegate.h" |
10 | 10 |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 RECT rect; | 752 RECT rect; |
753 HWND root_window = ::GetAncestor(host->window_handle(), GA_ROOT); | 753 HWND root_window = ::GetAncestor(host->window_handle(), GA_ROOT); |
754 ::GetWindowRect(root_window, &rect); | 754 ::GetWindowRect(root_window, &rect); |
755 *out_rect = gfx::Rect(rect); | 755 *out_rect = gfx::Rect(rect); |
756 } | 756 } |
757 } | 757 } |
758 | 758 |
759 void TestWebViewDelegate::DidMove(WebWidget* webwidget, | 759 void TestWebViewDelegate::DidMove(WebWidget* webwidget, |
760 const WebPluginGeometry& move) { | 760 const WebPluginGeometry& move) { |
761 WebPluginDelegateImpl::MoveWindow( | 761 WebPluginDelegateImpl::MoveWindow( |
762 move.window, move.window_rect, move.clip_rect, move.visible); | 762 move.window, move.window_rect, move.clip_rect, move.cutout_rects, |
| 763 move.visible); |
763 } | 764 } |
764 | 765 |
765 void TestWebViewDelegate::RunModal(WebWidget* webwidget) { | 766 void TestWebViewDelegate::RunModal(WebWidget* webwidget) { |
766 Show(webwidget, NEW_WINDOW); | 767 Show(webwidget, NEW_WINDOW); |
767 | 768 |
768 WindowList* wl = TestShell::windowList(); | 769 WindowList* wl = TestShell::windowList(); |
769 for (WindowList::const_iterator i = wl->begin(); i != wl->end(); ++i) { | 770 for (WindowList::const_iterator i = wl->begin(); i != wl->end(); ++i) { |
770 if (*i != shell_->mainWnd()) | 771 if (*i != shell_->mainWnd()) |
771 EnableWindow(*i, FALSE); | 772 EnableWindow(*i, FALSE); |
772 } | 773 } |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 else | 908 else |
908 return L"main frame"; | 909 return L"main frame"; |
909 } else { | 910 } else { |
910 if (name.length()) | 911 if (name.length()) |
911 return L"frame \"" + name + L"\""; | 912 return L"frame \"" + name + L"\""; |
912 else | 913 else |
913 return L"frame (anonymous)"; | 914 return L"frame (anonymous)"; |
914 } | 915 } |
915 } | 916 } |
916 | 917 |
OLD | NEW |