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

Unified Diff: ui/app_list/presenter/app_list.h

Issue 2576913002: Use mojo app list interfaces for mash and classic ash. (Closed)
Patch Set: Fix AppListPresenterImplTest. Created 4 years 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
Index: ui/app_list/presenter/app_list.h
diff --git a/ui/app_list/presenter/app_list.h b/ui/app_list/presenter/app_list.h
index 2cf701d2a5cbd1a1f6a9ae07f4f2b8b908f922fe..fb4b8a22c04b666dd96a3cdfca9be9cb20e7708d 100644
--- a/ui/app_list/presenter/app_list.h
+++ b/ui/app_list/presenter/app_list.h
@@ -23,8 +23,19 @@ class APP_LIST_PRESENTER_EXPORT AppList : public mojom::AppList {
// Get a raw pointer to the mojom::AppListPresenter interface; may be null.
mojom::AppListPresenter* GetAppListPresenter();
+ // Helper functions to call the underlying functionality on the presenter.
+ void Show(int64_t display_id);
+ void Dismiss();
+ void ToggleAppList(int64_t display_id);
+
+ // Helper functions to get the cached state as reported by the presenter.
+ bool IsVisible() const;
+ bool GetTargetVisibility() const;
+
// mojom::AppList:
void SetAppListPresenter(mojom::AppListPresenterPtr presenter) override;
+ void OnTargetVisibilityChanged(bool visible) override;
+ void OnVisibilityChanged(bool visible) override;
private:
// Bindings for the mojom::AppList interface.
@@ -33,6 +44,10 @@ class APP_LIST_PRESENTER_EXPORT AppList : public mojom::AppList {
// App list presenter interface in chrome; used to show/hide the app list.
mojom::AppListPresenterPtr presenter_;
+ // The cached [target] visibility, as reported by the presenter.
+ bool target_visible_ = false;
+ bool visible_ = false;
+
DISALLOW_COPY_AND_ASSIGN(AppList);
};

Powered by Google App Engine
This is Rietveld 408576698