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

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

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Fixed msw's comments. 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..8e0bf90df150a3e942eba3d99d871f615f809be1 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() {
tdanderson 2017/07/17 22:44:37 This also needs to be removed from the .h
minch1 2017/07/18 03:59:00 Done.
- 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();
@@ -603,6 +590,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();
}

Powered by Google App Engine
This is Rietveld 408576698