| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #include "ash/app_list/app_list_delegate_impl.h" | 5 #include "ash/app_list/app_list_delegate_impl.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ui/app_list/app_list_features.h" | 9 #include "ui/app_list/app_list_features.h" |
| 10 #include "ui/app_list/presenter/app_list.h" | 10 #include "ui/app_list/presenter/app_list.h" |
| 11 | 11 |
| 12 namespace ash { | 12 namespace ash { |
| 13 // TODO(newcomer): Remove this class as a part of crbug.com/726838 | 13 // TODO(newcomer): Remove this class as a part of crbug.com/726838 |
| 14 AppListDelegateImpl::AppListDelegateImpl() { | 14 AppListDelegateImpl::AppListDelegateImpl() { |
| 15 Shell::Get()->app_list()->set_delegate(this); | 15 Shell::Get()->app_list()->set_delegate(this); |
| 16 } | 16 } |
| 17 | 17 |
| 18 AppListDelegateImpl::~AppListDelegateImpl() { | 18 AppListDelegateImpl::~AppListDelegateImpl() { |
| 19 Shell::Get()->app_list()->set_delegate(nullptr); | 19 Shell::Get()->app_list()->set_delegate(nullptr); |
| 20 } | 20 } |
| 21 | 21 |
| 22 void AppListDelegateImpl::OnAppListVisibilityChanged(bool visible, | 22 void AppListDelegateImpl::OnAppListVisibilityChanged(bool visible, |
| 23 int64_t display_id) { | 23 int64_t display_id) { |
| 24 if (app_list::features::IsFullscreenAppListEnabled()) { | 24 if (app_list::features::IsFullscreenAppListEnabled()) { |
| 25 aura::Window* root_window = | 25 aura::Window* root_window = |
| 26 Shell::Get()->GetRootWindowForDisplayId(display_id); | 26 Shell::Get()->GetRootWindowForDisplayId(display_id); |
| 27 Shell::Get()->OnAppListVisibilityChanged(visible, root_window); | 27 Shell::Get()->NotifyAppListVisibilityChanged(visible, root_window); |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 | 30 |
| 31 } // namespace ash | 31 } // namespace ash |
| OLD | NEW |