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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 Layout(); | 108 Layout(); |
109 PreferredSizeChanged(); | 109 PreferredSizeChanged(); |
110 SchedulePaint(); | 110 SchedulePaint(); |
111 } | 111 } |
112 | 112 |
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 views::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::GestureStatus TrayNotificationView::OnGestureEvent( |
124 const views::GestureEvent& event) { | 124 const views::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::GESTURE_STATUS_UNKNOWN; |
127 HandleClickAction(); | 127 HandleClickAction(); |
128 return ui::GESTURE_STATUS_CONSUMED; | 128 return ui::GESTURE_STATUS_CONSUMED; |
(...skipping 10 matching lines...) Expand all Loading... |
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 |