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

Side by Side Diff: ui/app_list/presenter/test/test_app_list_presenter.h

Issue 2576913002: Use mojo app list interfaces for mash and classic ash. (Closed)
Patch Set: Fix test name. Created 3 years, 12 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 unified diff | Download patch
OLDNEW
(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 UI_APP_LIST_PRESENTER_TEST_TEST_APP_LIST_PRESENTER_H_
6 #define UI_APP_LIST_PRESENTER_TEST_TEST_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
12 namespace app_list {
13
14 // A test implementation of AppListPresenter that records function call counts.
15 // Registers itself as the presenter for the app list on construction.
16 class TestAppListPresenter : public app_list::mojom::AppListPresenter {
mfomitchev 2016/12/22 03:17:45 This and other test classes should probably be in
msw 2016/12/22 16:31:52 Done.
17 public:
18 TestAppListPresenter();
19 ~TestAppListPresenter() override;
20
21 app_list::mojom::AppListPresenterPtr CreateInterfacePtrAndBind();
22
23 // app_list::mojom::AppListPresenter:
24 void Show(int64_t display_id) override;
25 void Dismiss() override;
26 void ToggleAppList(int64_t display_id) override;
27
28 size_t show_count() const { return show_count_; }
29 size_t dismiss_count() const { return dismiss_count_; }
30 size_t toggle_count() const { return toggle_count_; }
31
32 private:
33 size_t show_count_ = 0u;
34 size_t dismiss_count_ = 0u;
35 size_t toggle_count_ = 0u;
36
37 mojo::Binding<app_list::mojom::AppListPresenter> binding_;
38
39 DISALLOW_COPY_AND_ASSIGN(TestAppListPresenter);
40 };
41
42 } // namespace app_list
43
44 #endif // UI_APP_LIST_PRESENTER_TEST_TEST_APP_LIST_PRESENTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698