| 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..ebdd776847fca9e135ed10cc150dc449f430eca5 100644
|
| --- a/ash/system/web_notification/web_notification_tray.cc
|
| +++ b/ash/system/web_notification/web_notification_tray.cc
|
| @@ -439,14 +439,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();
|
| @@ -480,6 +472,12 @@ void WebNotificationTray::HideBubble(const views::TrayBubbleView* bubble_view) {
|
| HideBubbleWithView(bubble_view);
|
| }
|
|
|
| +bool WebNotificationTray::ProcessGestureEventForBubble(
|
| + ui::GestureEvent* event) {
|
| + return drag_controller()->ProcessGestureEvent(*event, this,
|
| + true /* is_on_bubble */);
|
| +}
|
| +
|
| bool WebNotificationTray::ShowNotifierSettings() {
|
| if (message_center_bubble()) {
|
| static_cast<message_center::MessageCenterBubble*>(
|
| @@ -603,6 +601,41 @@ 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;
|
| +}
|
| +
|
| +bool WebNotificationTray::HasBubble() {
|
| + return message_center_bubble_.get() != NULL;
|
| +}
|
| +
|
| +void WebNotificationTray::CloseBubble() {
|
| + message_center_tray_->HideMessageCenterBubble();
|
| +}
|
| +
|
| +void WebNotificationTray::ShowBubble() {
|
| + message_center_tray_->ShowMessageCenterBubble();
|
| +}
|
| +
|
| +views::TrayBubbleView* WebNotificationTray::GetBubbleView() {
|
| + if (HasBubble())
|
| + return message_center_bubble_->bubble_view();
|
| + return nullptr;
|
| +}
|
| +
|
| +void WebNotificationTray::OnGestureEvent(ui::GestureEvent* event) {
|
| + if (drag_controller()->ProcessGestureEvent(*event, this,
|
| + false /* is_on_bubble */)) {
|
| + event->SetHandled();
|
| + } else {
|
| + TrayBackgroundView::OnGestureEvent(event);
|
| + }
|
| +}
|
| +
|
| message_center::MessageCenter* WebNotificationTray::message_center() const {
|
| return message_center_tray_->message_center();
|
| }
|
|
|