Index: ash/system/web_notification/web_notification_tray.cc |
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc |
index 6800c8775863171c70d99c89fd0aa0ec002c8a8c..8ac2323c91018ee0906c6677636867590ad603c6 100644 |
--- a/ash/system/web_notification/web_notification_tray.cc |
+++ b/ash/system/web_notification/web_notification_tray.cc |
@@ -306,6 +306,9 @@ WebNotificationTray::WebNotificationTray(Shelf* shelf, |
OnMessageCenterTrayChanged(); |
tray_container()->SetMargin(kTrayMainAxisInset, kTrayCrossAxisInset); |
+ |
+ if (!drag_controller()) |
+ set_drag_controller(base::MakeUnique<TrayDragController>(shelf)); |
} |
WebNotificationTray::~WebNotificationTray() { |
@@ -400,11 +403,6 @@ bool WebNotificationTray::IsMessageCenterBubbleVisible() const { |
message_center_bubble()->bubble()->IsVisible()); |
} |
-void WebNotificationTray::ShowMessageCenterBubble() { |
- if (!IsMessageCenterBubbleVisible()) |
- message_center_tray_->ShowMessageCenterBubble(); |
-} |
- |
void WebNotificationTray::UpdateAfterLoginStatusChange( |
LoginStatus login_status) { |
message_center()->SetLockedState(login_status == LoginStatus::LOCKED); |
@@ -439,14 +437,6 @@ void WebNotificationTray::HideBubbleWithView( |
} |
} |
-bool WebNotificationTray::PerformAction(const ui::Event& event) { |
- if (message_center_bubble()) |
- message_center_tray_->HideMessageCenterBubble(); |
- else |
- message_center_tray_->ShowMessageCenterBubble(); |
- return true; |
-} |
- |
void WebNotificationTray::BubbleViewDestroyed() { |
if (message_center_bubble()) |
message_center_bubble()->bubble()->BubbleViewDestroyed(); |
@@ -603,6 +593,28 @@ void WebNotificationTray::ClickedOutsideBubble() { |
message_center_tray_->HideMessageCenterBubble(); |
} |
+bool WebNotificationTray::PerformAction(const ui::Event& event) { |
+ if (message_center_bubble()) |
+ message_center_tray_->HideMessageCenterBubble(); |
+ else |
+ message_center_tray_->ShowMessageCenterBubble(); |
+ return true; |
+} |
+ |
+void WebNotificationTray::CloseBubble() { |
+ message_center_tray_->HideMessageCenterBubble(); |
+} |
+ |
+void WebNotificationTray::ShowBubble() { |
+ if (!IsMessageCenterBubbleVisible()) |
+ message_center_tray_->ShowMessageCenterBubble(); |
+} |
+ |
+views::TrayBubbleView* WebNotificationTray::GetBubbleView() { |
+ return message_center_bubble_ ? message_center_bubble_->bubble_view() |
+ : nullptr; |
+} |
+ |
message_center::MessageCenter* WebNotificationTray::message_center() const { |
return message_center_tray_->message_center(); |
} |