Chromium Code Reviews| Index: chrome/browser/chromeos/extensions/wallpaper_private_api.cc |
| diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc |
| index 6e0f19be7c2df1bdf532af893a5833ba4d750da5..407ac9f430eaab8f3e5edf34e986c40d7008eb96 100644 |
| --- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc |
| +++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc |
| @@ -169,6 +169,11 @@ WindowStateManager* g_window_state_manager = NULL; |
| // static |
| void WindowStateManager::MinimizeInactiveWindows( |
| const std::string& user_id_hash) { |
| + if (!ash::Shell::HasInstance() || ash::Shell::GetInstance()->in_mus()) { |
|
sadrul
2016/05/19 19:45:22
If there's a Shell instance, it should never have
msw
2016/05/19 20:22:17
Done.
|
| + NOTIMPLEMENTED(); |
| + return; |
| + } |
| + |
| if (!g_window_state_manager) |
| g_window_state_manager = new WindowStateManager(); |
| g_window_state_manager->BuildWindowListAndMinimizeInactiveForUser( |
| @@ -177,6 +182,11 @@ void WindowStateManager::MinimizeInactiveWindows( |
| // static |
| void WindowStateManager::RestoreWindows(const std::string& user_id_hash) { |
| + if (!ash::Shell::HasInstance() || ash::Shell::GetInstance()->in_mus()) { |
| + NOTIMPLEMENTED(); |
| + return; |
| + } |
| + |
| if (!g_window_state_manager) { |
| DCHECK(false) << "This should only be called after calling " |
| << "MinimizeInactiveWindows."; |