Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2436)

Unified Diff: ash/shell/example_app_list_presenter.h

Issue 2576913002: Use mojo app list interfaces for mash and classic ash. (Closed)
Patch Set: Sync and rebase Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | ash/shell/example_app_list_presenter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « ash/shell/content/client/shell_browser_main_parts.cc ('k') | ash/shell/example_app_list_presenter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698