Chromium Code Reviews| Index: ui/views/win/fullscreen_handler.cc |
| diff --git a/ui/views/win/fullscreen_handler.cc b/ui/views/win/fullscreen_handler.cc |
| index 89581d79d06dbae1ebe657ede9aca043725cba7f..df51c3526342a33d57b99228842dbb03f8cfb24e 100644 |
| --- a/ui/views/win/fullscreen_handler.cc |
| +++ b/ui/views/win/fullscreen_handler.cc |
| @@ -26,6 +26,13 @@ void FullscreenHandler::SetFullscreen(bool fullscreen) { |
| if (fullscreen_ == fullscreen) |
| return; |
| + if (!task_bar_list_) { |
|
msw
2017/07/06 18:32:55
It's a little odd to init the value here and use i
ananta
2017/07/06 18:44:51
Thanks. I moved this block to the SetFullscreenImp
|
| + HRESULT hr = ::CoCreateInstance(CLSID_TaskbarList, NULL, |
| + CLSCTX_INPROC_SERVER, |
| + IID_PPV_ARGS(&task_bar_list_)); |
| + CHECK(SUCCEEDED(hr)); |
| + } |
| + |
| SetFullscreenImpl(fullscreen); |
| } |
| @@ -85,6 +92,12 @@ void FullscreenHandler::SetFullscreenImpl(bool fullscreen) { |
| new_rect.height(), |
| SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED); |
| } |
|
msw
2017/07/06 18:32:55
nit: add a blank line after this
ananta
2017/07/06 18:44:51
Done.
|
| + // As per msdn marking the window as fullscreen should ensure that the |
|
msw
2017/07/06 18:32:55
nit: capitalize 'MSDN'
ananta
2017/07/06 18:44:51
Done.
|
| + // taskbar is moved to the bottom of the Z order when the fullscreen window |
|
msw
2017/07/06 18:32:55
nit: hyphenate 'Z-order'
ananta
2017/07/06 18:44:51
Done.
|
| + // is activated. If the window is not fullscreen the Shell fallsback to |
|
msw
2017/07/06 18:32:55
nits: comma after 'fullscreen,' and split words 'f
ananta
2017/07/06 18:44:51
Done.
|
| + // heuristics to determine how the window should be treated, which means |
| + // that it could still consider the window as fullscreen. :( |
| + task_bar_list_->MarkFullscreenWindow(hwnd_, !!fullscreen); |
|
msw
2017/07/06 18:32:55
As this only moves the taskbar to the bottom of th
ananta
2017/07/06 18:44:51
I think the reason we use SWP_NOACTIVATE is to avo
|
| } |
| } // namespace views |