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

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

Issue 2961313003: Touch gestures for System Tray/ IME/ Stylus/ Notifications (Closed)
Patch Set: Fixed nits. 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
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | ui/views/bubble/tray_bubble_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | ui/views/bubble/tray_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698