Chromium Code Reviews| Index: ash/shell/example_app_list_presenter.h |
| diff --git a/ash/shell/example_app_list_presenter.h b/ash/shell/example_app_list_presenter.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..0f54957ac9fa68c45cf19265ddc695448d3fe26c |
| --- /dev/null |
| +++ b/ash/shell/example_app_list_presenter.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef ASH_SHELL_EXAMPLE_APP_LIST_PRESENTER_H_ |
| +#define ASH_SHELL_EXAMPLE_APP_LIST_PRESENTER_H_ |
| + |
| +#include "ash/app_list/app_list_presenter_delegate_factory.h" |
| +#include "base/macros.h" |
| +#include "mojo/public/cpp/bindings/binding.h" |
| +#include "ui/app_list/presenter/app_list_presenter.mojom.h" |
| +#include "ui/app_list/presenter/app_list_presenter_impl.h" |
| +#include "ui/app_list/presenter/test/test_app_list_view_delegate_factory.h" |
| + |
| +namespace ash { |
| +namespace shell { |
| + |
| +// An example implementation of AppListPresenter used for ash_shell. |
|
Daniel Erat
2016/12/22 18:17:57
how will this example class be used? is it a stub
msw
2016/12/23 03:59:34
Hopefully the comment is clear enough, it's used f
|
| +class ExampleAppListPresenter : public app_list::mojom::AppListPresenter { |
| + public: |
| + ExampleAppListPresenter(); |
| + ~ExampleAppListPresenter() override; |
| + |
| + app_list::mojom::AppListPresenterPtr CreateInterfacePtrAndBind(); |
| + |
| + // app_list::mojom::AppListPresenter: |
| + void Show(int64_t display_id) override; |
| + void Dismiss() override; |
| + void ToggleAppList(int64_t display_id) override; |
| + |
| + private: |
| + mojo::Binding<app_list::mojom::AppListPresenter> binding_; |
| + AppListPresenterDelegateFactory app_list_presenter_delegate_factory_; |
| + app_list::AppListPresenterImpl app_list_presenter_impl_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ExampleAppListPresenter); |
| +}; |
| + |
| +} // namespace shell |
| +} // namespace ash |
| + |
| +#endif // ASH_SHELL_EXAMPLE_APP_LIST_PRESENTER_H_ |