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 c35bad52ccaed03e81f9c7fb3975b5c9fc6e2e7d..6cbe30ade52fce0d7547bb64fda57be81bde0b11 100644 |
| --- a/ui/views/win/fullscreen_handler.cc |
| +++ b/ui/views/win/fullscreen_handler.cc |
| @@ -90,7 +90,8 @@ void FullscreenHandler::SetFullscreenImpl(bool fullscreen) { |
| HRESULT hr = ::CoCreateInstance(CLSID_TaskbarList, NULL, |
| CLSCTX_INPROC_SERVER, |
| IID_PPV_ARGS(&task_bar_list_)); |
| - CHECK(SUCCEEDED(hr)); |
| + if (SUCCEEDED(hr) && FAILED(task_bar_list_->HrInit())) |
| + task_bar_list_ = nullptr; |
|
msw
2017/07/10 18:53:31
Maybe we should have a flag to avoid retrying crea
|
| } |
| // As per MSDN marking the window as fullscreen should ensure that the |
| @@ -98,7 +99,8 @@ void FullscreenHandler::SetFullscreenImpl(bool fullscreen) { |
| // is activated. If the window is not fullscreen, the Shell falls back to |
| // 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); |
| + if (task_bar_list_) |
| + task_bar_list_->MarkFullscreenWindow(hwnd_, !!fullscreen); |
| } |
| } // namespace views |