| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/system/tray/tray_notification_view.h" | 5 #include "ash/system/tray/tray_notification_view.h" |
| 6 | 6 |
| 7 #include "ash/system/tray/system_tray_item.h" | 7 #include "ash/system/tray/system_tray_item.h" |
| 8 #include "ash/system/tray/tray_constants.h" | 8 #include "ash/system/tray/tray_constants.h" |
| 9 #include "grit/ash_strings.h" | 9 #include "grit/ash_strings.h" |
| 10 #include "grit/ui_resources.h" | 10 #include "grit/ui_resources.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 void TrayNotificationView::ButtonPressed(views::Button* sender, | 113 void TrayNotificationView::ButtonPressed(views::Button* sender, |
| 114 const ui::Event& event) { | 114 const ui::Event& event) { |
| 115 HandleClose(); | 115 HandleClose(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 bool TrayNotificationView::OnMousePressed(const ui::MouseEvent& event) { | 118 bool TrayNotificationView::OnMousePressed(const ui::MouseEvent& event) { |
| 119 HandleClickAction(); | 119 HandleClickAction(); |
| 120 return true; | 120 return true; |
| 121 } | 121 } |
| 122 | 122 |
| 123 ui::GestureStatus TrayNotificationView::OnGestureEvent( | 123 ui::EventResult TrayNotificationView::OnGestureEvent( |
| 124 const ui::GestureEvent& event) { | 124 const ui::GestureEvent& event) { |
| 125 if (event.type() != ui::ET_GESTURE_TAP) | 125 if (event.type() != ui::ET_GESTURE_TAP) |
| 126 return ui::GESTURE_STATUS_UNKNOWN; | 126 return ui::ER_UNHANDLED; |
| 127 HandleClickAction(); | 127 HandleClickAction(); |
| 128 return ui::GESTURE_STATUS_CONSUMED; | 128 return ui::ER_CONSUMED; |
| 129 } | 129 } |
| 130 | 130 |
| 131 void TrayNotificationView::OnClose() { | 131 void TrayNotificationView::OnClose() { |
| 132 } | 132 } |
| 133 | 133 |
| 134 void TrayNotificationView::OnClickAction() { | 134 void TrayNotificationView::OnClickAction() { |
| 135 } | 135 } |
| 136 | 136 |
| 137 void TrayNotificationView::HandleClose() { | 137 void TrayNotificationView::HandleClose() { |
| 138 OnClose(); | 138 OnClose(); |
| 139 tray_->HideNotificationView(); | 139 tray_->HideNotificationView(); |
| 140 } | 140 } |
| 141 | 141 |
| 142 void TrayNotificationView::HandleClickAction() { | 142 void TrayNotificationView::HandleClickAction() { |
| 143 HandleClose(); | 143 HandleClose(); |
| 144 OnClickAction(); | 144 OnClickAction(); |
| 145 } | 145 } |
| 146 | 146 |
| 147 } // namespace internal | 147 } // namespace internal |
| 148 } // namespace ash | 148 } // namespace ash |
| OLD | NEW |