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 "ui/message_center/message_view.h" | 5 #include "ui/message_center/message_view.h" |
6 | 6 |
7 #include "grit/ui_resources.h" | 7 #include "grit/ui_resources.h" |
8 #include "grit/ui_strings.h" | 8 #include "grit/ui_strings.h" |
9 #include "ui/base/l10n/l10n_util.h" | 9 #include "ui/base/l10n/l10n_util.h" |
10 #include "ui/base/models/simple_menu_model.h" | 10 #include "ui/base/models/simple_menu_model.h" |
(...skipping 129 matching lines...) Loading... |
140 event->SetHandled(); | 140 event->SetHandled(); |
141 return; | 141 return; |
142 } | 142 } |
143 | 143 |
144 if (event->type() == ui::ET_GESTURE_LONG_PRESS) { | 144 if (event->type() == ui::ET_GESTURE_LONG_PRESS) { |
145 ShowMenu(event->location()); | 145 ShowMenu(event->location()); |
146 event->SetHandled(); | 146 event->SetHandled(); |
147 return; | 147 return; |
148 } | 148 } |
149 | 149 |
150 SlideOutView::OnGestureEvent(event); | 150 MessageViewBase::OnGestureEvent(event); |
151 if (event->handled()) | 151 if (event->handled()) |
152 return; | 152 return; |
153 | 153 |
154 if (!event->IsScrollGestureEvent()) | 154 if (!event->IsScrollGestureEvent()) |
155 return; | 155 return; |
156 | 156 |
157 if (scroller_) | 157 if (scroller_) |
158 scroller_->OnGestureEvent(event); | 158 scroller_->OnGestureEvent(event); |
159 event->SetHandled(); | 159 event->SetHandled(); |
160 } | 160 } |
(...skipping 14 matching lines...) Loading... |
175 | 175 |
176 views::View::ConvertPointToScreen(this, &screen_location); | 176 views::View::ConvertPointToScreen(this, &screen_location); |
177 ignore_result(menu_runner.RunMenuAt( | 177 ignore_result(menu_runner.RunMenuAt( |
178 GetWidget()->GetTopLevelWidget(), | 178 GetWidget()->GetTopLevelWidget(), |
179 NULL, | 179 NULL, |
180 gfx::Rect(screen_location, gfx::Size()), | 180 gfx::Rect(screen_location, gfx::Size()), |
181 views::MenuItemView::TOPRIGHT, | 181 views::MenuItemView::TOPRIGHT, |
182 views::MenuRunner::HAS_MNEMONICS)); | 182 views::MenuRunner::HAS_MNEMONICS)); |
183 } | 183 } |
184 | 184 |
| 185 #ifdef USE_AURA |
185 void MessageView::OnSlideOut() { | 186 void MessageView::OnSlideOut() { |
186 list_delegate_->SendRemoveNotification(notification_.id); | 187 list_delegate_->SendRemoveNotification(notification_.id); |
187 } | 188 } |
| 189 #endif |
188 | 190 |
189 } // namespace message_center | 191 } // namespace message_center |
OLD | NEW |