Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: ash/system/web_notification/web_notification_tray.cc

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Fixed UT. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..798badb72793646d7d2996cd11b8a1f469f0abe7 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -400,11 +400,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 +434,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 +467,11 @@ void WebNotificationTray::HideBubble(const views::TrayBubbleView* bubble_view) {
HideBubbleWithView(bubble_view);
}
+bool WebNotificationTray::ProcessGestureEventForBubble(
+ ui::GestureEvent* event) {
+ return drag_controller()->ProcessGestureEvent(event, this);
+}
+
bool WebNotificationTray::ShowNotifierSettings() {
if (message_center_bubble()) {
static_cast<message_center::MessageCenterBubble*>(
@@ -603,6 +595,33 @@ 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;
+}
+
+void WebNotificationTray::OnGestureEvent(ui::GestureEvent* event) {
+ if (!drag_controller()->ProcessGestureEvent(event, this))
+ TrayBackgroundView::OnGestureEvent(event);
+}
+
message_center::MessageCenter* WebNotificationTray::message_center() const {
return message_center_tray_->message_center();
}

Powered by Google App Engine
This is Rietveld 408576698