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 831c1320da0abb9db63149ebf6111bd27b9558e5..be9e1652a16f35ef2d5c836005d8d1ef569bb1d4 100644 |
--- a/ash/system/web_notification/web_notification_tray.cc |
+++ b/ash/system/web_notification/web_notification_tray.cc |
@@ -305,6 +305,9 @@ WebNotificationTray::WebNotificationTray(Shelf* shelf, |
OnMessageCenterTrayChanged(); |
tray_container()->SetMargin(kTrayMainAxisInset, kTrayCrossAxisInset); |
+ |
+ if (!drag_controller()) |
+ set_drag_controller(base::MakeUnique<TrayDragController>(shelf)); |
} |
WebNotificationTray::~WebNotificationTray() { |
@@ -399,11 +402,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); |
@@ -438,14 +436,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(); |
@@ -602,6 +592,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(); |
} |