| Index: ui/platform_window/win/win_window.cc
|
| diff --git a/ui/platform_window/win/win_window.cc b/ui/platform_window/win/win_window.cc
|
| index 11db5fcfa6fda1b0613f1ac82aa654ef42fb9133..89ff68382f4bf2302e763026e48025137ee3f6b3 100644
|
| --- a/ui/platform_window/win/win_window.cc
|
| +++ b/ui/platform_window/win/win_window.cc
|
| @@ -13,6 +13,8 @@ namespace ui {
|
|
|
| namespace {
|
|
|
| +bool use_popup_as_root_window_for_test = false;
|
| +
|
| gfx::Rect GetWindowBoundsForClientBounds(DWORD style, DWORD ex_style,
|
| const gfx::Rect& bounds) {
|
| RECT wr;
|
| @@ -37,6 +39,8 @@ WinWindow::WinWindow(PlatformWindowDelegate* delegate,
|
| const gfx::Rect& bounds)
|
| : delegate_(delegate) {
|
| CHECK(delegate_);
|
| + if (use_popup_as_root_window_for_test)
|
| + set_window_style(WS_POPUP);
|
| gfx::Rect window_bounds = GetWindowBoundsForClientBounds(
|
| WS_OVERLAPPEDWINDOW, window_ex_style(), bounds);
|
| gfx::WindowImpl::Init(NULL, window_bounds);
|
| @@ -126,6 +130,7 @@ LRESULT WinWindow::OnKeyEvent(UINT message, WPARAM w_param, LPARAM l_param) {
|
| }
|
|
|
| LRESULT WinWindow::OnNCActivate(UINT message, WPARAM w_param, LPARAM l_param) {
|
| + delegate_->OnActivationChanged(!!w_param);
|
| return DefWindowProc(hwnd(), message, w_param, l_param);
|
| }
|
|
|
| @@ -162,4 +167,12 @@ void WinWindow::OnWindowPosChanged(WINDOWPOS* window_pos) {
|
| }
|
| }
|
|
|
| +namespace test {
|
| +
|
| +// static
|
| +void SetUsePopupAsRootWindowForTest(bool use) {
|
| + use_popup_as_root_window_for_test = use;
|
| +}
|
| +
|
| +} // namespace test
|
| } // namespace ui
|
|
|