OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "ui/app_list/presenter/app_list.h" | 5 #include "ui/app_list/presenter/app_list.h" |
6 | 6 |
7 namespace app_list { | 7 namespace app_list { |
8 | 8 |
9 AppList::AppList() {} | 9 AppList::AppList() {} |
10 | 10 |
11 AppList::~AppList() {} | 11 AppList::~AppList() {} |
12 | 12 |
13 void AppList::BindRequest(mojom::AppListRequest request) { | 13 void AppList::BindRequest(mojom::AppListRequest request) { |
14 bindings_.AddBinding(this, std::move(request)); | 14 bindings_.AddBinding(this, std::move(request)); |
15 } | 15 } |
16 | 16 |
17 mojom::AppListPresenter* AppList::GetAppListPresenter() { | 17 mojom::AppListPresenter* AppList::GetAppListPresenter() { |
18 return presenter_.get(); | 18 return presenter_.get(); |
19 } | 19 } |
20 | 20 |
| 21 void AppList::Show(int64_t display_id) { |
| 22 if (presenter_) |
| 23 presenter_->Show(display_id); |
| 24 } |
| 25 |
| 26 void AppList::Dismiss() { |
| 27 if (presenter_) |
| 28 presenter_->Dismiss(); |
| 29 } |
| 30 |
| 31 void AppList::ToggleAppList(int64_t display_id) { |
| 32 if (presenter_) |
| 33 presenter_->ToggleAppList(display_id); |
| 34 } |
| 35 |
| 36 bool AppList::IsVisible() const { |
| 37 return visible_; |
| 38 } |
| 39 |
| 40 bool AppList::GetTargetVisibility() const { |
| 41 return target_visible_; |
| 42 } |
| 43 |
21 void AppList::SetAppListPresenter(mojom::AppListPresenterPtr presenter) { | 44 void AppList::SetAppListPresenter(mojom::AppListPresenterPtr presenter) { |
22 presenter_ = std::move(presenter); | 45 presenter_ = std::move(presenter); |
23 } | 46 } |
24 | 47 |
| 48 void AppList::OnTargetVisibilityChanged(bool visible) { |
| 49 target_visible_ = visible; |
| 50 } |
| 51 |
| 52 void AppList::OnVisibilityChanged(bool visible) { |
| 53 visible_ = visible; |
| 54 } |
| 55 |
25 } // namespace app_list | 56 } // namespace app_list |
OLD | NEW |