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

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

Issue 2809133002: 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 39c3c6e4337eb5797c2e18d6bbb02ad7862aee98..cbba6a57f4bb780936ece454e561d545a9234fe6 100644
--- a/ui/arc/notification/arc_custom_notification_view.cc
+++ b/ui/arc/notification/arc_custom_notification_view.cc
@@ -342,9 +342,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