Commit 2e7d2bd1 authored by Tim Song's avatar Tim Song Committed by Commit Bot

Ash Tray: Fix ChromeVox crash in when opening message center in tablet mode.

The current TrayBubbleView::Delegate implementation is causing the message
center to be activated before it is ready, so we will just use the default stub
implementation.

Change-Id: Ibc73de7d1516d2ebd72e870ab5d3db3963887845
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1938253Reviewed-by: default avatarAhmed Mehfooz <amehfooz@chromium.org>
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719460}
parent 4d348517
......@@ -10,7 +10,6 @@
#include "ash/style/ash_color_provider.h"
#include "ash/style/default_color_constants.h"
#include "ash/system/message_center/unified_message_center_view.h"
#include "ash/system/tray/tray_bubble_view.h"
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_event_filter.h"
#include "ash/system/unified/unified_system_tray.h"
......@@ -66,7 +65,7 @@ class UnifiedMessageCenterBubble::Border : public ui::LayerDelegate {
UnifiedMessageCenterBubble::UnifiedMessageCenterBubble(UnifiedSystemTray* tray)
: tray_(tray), border_(std::make_unique<Border>()) {
TrayBubbleView::InitParams init_params;
init_params.delegate = tray;
init_params.delegate = this;
// Anchor within the overlay container.
init_params.parent_window = tray->GetBubbleWindowContainer();
init_params.anchor_mode = TrayBubbleView::AnchorMode::kRect;
......
......@@ -6,6 +6,7 @@
#define ASH_SYSTEM_MESSAGE_CENTER_UNIFIED_MESSAGE_CENTER_BUBBLE_H_
#include "ash/system/tray/tray_bubble_base.h"
#include "ash/system/tray/tray_bubble_view.h"
#include "ui/views/view_observer.h"
#include "ui/views/widget/widget_observer.h"
......@@ -15,13 +16,13 @@ class Widget;
namespace ash {
class TrayBubbleView;
class UnifiedSystemTray;
class UnifiedMessageCenterView;
// Manages the bubble that contains UnifiedMessageCenterView.
// Shows the bubble on the constructor, and closes the bubble on the destructor.
class ASH_EXPORT UnifiedMessageCenterBubble : public TrayBubbleBase,
public TrayBubbleView::Delegate,
public views::ViewObserver,
public views::WidgetObserver {
public:
......
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