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

Unified Diff: ui/arc/notification/arc_custom_notification_view.cc

Issue 2816163002: Create the control buttons on a notification when showing the buttons if needed. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/arc/notification/arc_custom_notification_view.cc
diff --git a/ui/arc/notification/arc_custom_notification_view.cc b/ui/arc/notification/arc_custom_notification_view.cc
index f15deff5d17e5fcf5e6f65ccb2e73b6bc3d24fcd..0f1abbe9f8343d8f329c681739d5dd2881179752 100644
--- a/ui/arc/notification/arc_custom_notification_view.cc
+++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -345,9 +345,16 @@ void ArcCustomNotificationView::UpdatePreferredSize() {
}
void ArcCustomNotificationView::UpdateControlButtonsVisibility() {
- if (!surface_ || !floating_control_buttons_widget_)
+ if (!surface_)
return;
+ if (!floating_control_buttons_widget_) {
+ if (GetWidget())
+ CreateFloatingControlButtons();
+ else
+ return;
+ }
+
const bool target_visiblity =
IsMouseHovered() || (close_button_ && close_button_->HasFocus()) ||
(settings_button_ && settings_button_->HasFocus());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698