Commit 9ef10a9b authored by yoshiki iguchi's avatar yoshiki iguchi Committed by Commit Bot

Rebuilt popup bubbles correctly after the shelf alignment is changed

Previously popup bubbles remain with insufficient state after the shelf
position is changed. This CL adds the code to explicitly recreate bubbles
so that it works correctly even after the shelf position is updated.

Bug: 820400
Test: manual test (checked the repro steps in the issue)
Change-Id: I7c196614c2a148eda53650cae145b544af9bbded
Reviewed-on: https://chromium-review.googlesource.com/960681Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Commit-Queue: Yoshiki Iguchi <yoshiki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543062}
parent 7f9a64d3
...@@ -444,9 +444,12 @@ bool WebNotificationTray::IsMessageCenterVisible() const { ...@@ -444,9 +444,12 @@ bool WebNotificationTray::IsMessageCenterVisible() const {
void WebNotificationTray::UpdateAfterShelfAlignmentChange() { void WebNotificationTray::UpdateAfterShelfAlignmentChange() {
TrayBackgroundView::UpdateAfterShelfAlignmentChange(); TrayBackgroundView::UpdateAfterShelfAlignmentChange();
// Destroy any existing bubble so that it will be rebuilt correctly. // Destroy existing message center bubble so that it won't be reused.
message_center_ui_controller_->HideMessageCenterBubble(); message_center_ui_controller_->HideMessageCenterBubble();
// Destroy any existing popup bubbles and rebuilt if necessary.
message_center_ui_controller_->HidePopupBubble(); message_center_ui_controller_->HidePopupBubble();
message_center_ui_controller_->ShowPopupBubble();
} }
void WebNotificationTray::AnchorUpdated() { void WebNotificationTray::AnchorUpdated() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment