| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "ash/mus/app_list_presenter_mus.h" | |
| 6 | |
| 7 #include "ash/common/wm_shell.h" | |
| 8 #include "ui/app_list/presenter/app_list.h" | |
| 9 | |
| 10 namespace ash { | |
| 11 | |
| 12 AppListPresenterMus::AppListPresenterMus() {} | |
| 13 | |
| 14 AppListPresenterMus::~AppListPresenterMus() {} | |
| 15 | |
| 16 void AppListPresenterMus::Show(int64_t display_id) { | |
| 17 app_list::mojom::AppListPresenter* app_list_presenter = | |
| 18 WmShell::Get()->app_list()->GetAppListPresenter(); | |
| 19 if (app_list_presenter) | |
| 20 app_list_presenter->Show(display_id); | |
| 21 } | |
| 22 | |
| 23 void AppListPresenterMus::Dismiss() { | |
| 24 app_list::mojom::AppListPresenter* app_list_presenter = | |
| 25 WmShell::Get()->app_list()->GetAppListPresenter(); | |
| 26 if (app_list_presenter) | |
| 27 app_list_presenter->Dismiss(); | |
| 28 } | |
| 29 | |
| 30 void AppListPresenterMus::ToggleAppList(int64_t display_id) { | |
| 31 app_list::mojom::AppListPresenter* app_list_presenter = | |
| 32 WmShell::Get()->app_list()->GetAppListPresenter(); | |
| 33 if (app_list_presenter) | |
| 34 app_list_presenter->ToggleAppList(display_id); | |
| 35 } | |
| 36 | |
| 37 bool AppListPresenterMus::IsVisible() const { | |
| 38 return false; | |
| 39 } | |
| 40 | |
| 41 bool AppListPresenterMus::GetTargetVisibility() const { | |
| 42 // TODO(mfomitchev): we have GetTargetVisibility() in mojom, but this | |
| 43 // shouldn't be a synchronous method. We should go through the call sites and | |
| 44 // either teach them to use a callback, or perhaps use a visibility observer. | |
| 45 // NOTIMPLEMENTED(); | |
| 46 return false; | |
| 47 } | |
| 48 | |
| 49 } // namespace ash | |
| OLD | NEW |