Chromium Code Reviews (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out

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

Issue 2534953006: Fix shelf auto-hide calculation for app-list visibility. (Closed)
Patch Set: Cleanup. 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_presenter_impl.h
diff --git a/ui/app_list/presenter/app_list_presenter_impl.h b/ui/app_list/presenter/app_list_presenter_impl.h
index 537d1c0dae2668273c2090429db467103f3cd5a4..07d0e88378e1bae9b08bccd83df38fdb22c03058 100644
--- a/ui/app_list/presenter/app_list_presenter_impl.h
+++ b/ui/app_list/presenter/app_list_presenter_impl.h
@@ -54,8 +54,10 @@ class APP_LIST_PRESENTER_EXPORT AppListPresenterImpl
void Show(int64_t display_id) override;
void Dismiss() final;
void ToggleAppList(int64_t display_id) override;
- bool IsVisible() const override;
- bool GetTargetVisibility() const override;
+ bool IsVisible(
+ int64_t display_id = display::kInvalidDisplayId) const override;
+ bool GetTargetVisibility(
+ int64_t display_id = display::kInvalidDisplayId) const override;
friend class test::AppListPresenterImplTestApi;
@@ -96,8 +98,9 @@ class APP_LIST_PRESENTER_EXPORT AppListPresenterImpl
// Responsible for laying out the app list UI.
std::unique_ptr<AppListPresenterDelegate> presenter_delegate_;
- // Whether we should show or hide app list widget.
- bool is_visible_ = false;
+ // The id of the display on which the app list should be shown. A valid id
+ // means the target visiblity is shown, while invalid means hidden.
James Cook 2016/11/30 23:27:20 nit: visibility
+ int64_t target_display_id_ = display::kInvalidDisplayId;
James Cook 2016/11/30 23:27:19 optional: I'd also be OK with separate target_visi
// The AppListView this class manages, owned by its widget.
AppListView* view_ = nullptr;

Powered by Google App Engine
This is Rietveld 408576698