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..d6c2bff891d94002c265e888af7b27435d870089 |
--- /dev/null |
+++ b/ash/shell/example_app_list_presenter.h |
@@ -0,0 +1,40 @@ |
+// 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 "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. |
+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_; |
+ app_list::AppListPresenterImpl app_list_presenter_impl_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(ExampleAppListPresenter); |
+}; |
+ |
+} // namespace shell |
+} // namespace ash |
+ |
+#endif // ASH_SHELL_EXAMPLE_APP_LIST_PRESENTER_H_ |