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 #ifndef ASH_SHELL_EXAMPLE_APP_LIST_PRESENTER_H_ |
| 6 #define ASH_SHELL_EXAMPLE_APP_LIST_PRESENTER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "mojo/public/cpp/bindings/binding.h" |
| 10 #include "ui/app_list/presenter/app_list_presenter.mojom.h" |
| 11 #include "ui/app_list/presenter/app_list_presenter_impl.h" |
| 12 #include "ui/app_list/presenter/test/test_app_list_view_delegate_factory.h" |
| 13 |
| 14 namespace ash { |
| 15 namespace shell { |
| 16 |
| 17 // An example implementation of AppListPresenter used for ash_shell. |
| 18 class ExampleAppListPresenter : public app_list::mojom::AppListPresenter { |
| 19 public: |
| 20 ExampleAppListPresenter(); |
| 21 ~ExampleAppListPresenter() override; |
| 22 |
| 23 app_list::mojom::AppListPresenterPtr CreateInterfacePtrAndBind(); |
| 24 |
| 25 // app_list::mojom::AppListPresenter: |
| 26 void Show(int64_t display_id) override; |
| 27 void Dismiss() override; |
| 28 void ToggleAppList(int64_t display_id) override; |
| 29 |
| 30 private: |
| 31 mojo::Binding<app_list::mojom::AppListPresenter> binding_; |
| 32 app_list::AppListPresenterImpl app_list_presenter_impl_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(ExampleAppListPresenter); |
| 35 }; |
| 36 |
| 37 } // namespace shell |
| 38 } // namespace ash |
| 39 |
| 40 #endif // ASH_SHELL_EXAMPLE_APP_LIST_PRESENTER_H_ |
OLD | NEW |