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

Unified Diff: ash/common/shelf/app_list_button.h

Issue 2534953006: Fix shelf auto-hide calculation for app-list visibility. (Closed)
Patch Set: try another approach. 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
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.cc ('k') | ash/common/shelf/app_list_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/shelf/app_list_button.h
diff --git a/ash/common/shelf/app_list_button.h b/ash/common/shelf/app_list_button.h
index fad5bbeb9a16d254279f7c32fb6ef22bfb0c7962..24159a0cdb7b34092a4785e2aefb97692c98b41c 100644
--- a/ash/common/shelf/app_list_button.h
+++ b/ash/common/shelf/app_list_button.h
@@ -25,7 +25,9 @@ class ASH_EXPORT AppListButton : public views::ImageButton {
void OnAppListShown();
void OnAppListDismissed();
- bool draw_background_as_active() { return draw_background_as_active_; }
+ bool is_showing_app_list() const { return is_showing_app_list_; }
+
+ bool draw_background_as_active() const { return draw_background_as_active_; }
// Sets alpha value of the background and schedules a paint.
void SetBackgroundAlpha(int alpha);
@@ -63,12 +65,15 @@ class ASH_EXPORT AppListButton : public views::ImageButton {
// ink drops.
gfx::Point GetCenterPoint() const;
+ // True if the app list is currently showing for this button.
James Cook 2016/12/01 02:02:07 nit: button/display (since the fact that this is p
msw 2016/12/01 04:18:13 Done.
+ bool is_showing_app_list_ = false;
James Cook 2016/12/01 02:02:07 nit: I prefer to either initialize all members in
msw 2016/12/01 04:18:13 Done.
+
// True if the background should render as active, regardless of the state of
// the application list.
- bool draw_background_as_active_;
+ bool draw_background_as_active_ = false;
// Alpha value used to paint the background.
- int background_alpha_;
+ int background_alpha_ = 0;
InkDropButtonListener* listener_;
ShelfView* shelf_view_;
« no previous file with comments | « ash/app_list/app_list_presenter_delegate.cc ('k') | ash/common/shelf/app_list_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698