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

Side by Side Diff: ui/message_center/message_view.cc

Issue 12079061: Sends the scroll gesture to scrollbar. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 return; 257 return;
258 } 258 }
259 259
260 if (event->type() == ui::ET_GESTURE_LONG_PRESS) { 260 if (event->type() == ui::ET_GESTURE_LONG_PRESS) {
261 ShowMenu(event->location()); 261 ShowMenu(event->location());
262 event->SetHandled(); 262 event->SetHandled();
263 return; 263 return;
264 } 264 }
265 265
266 SlideOutView::OnGestureEvent(event); 266 SlideOutView::OnGestureEvent(event);
267 if (event->handled()) 267 // Do not return here by checking handled(). SlideOutView calls SetHandled()
268 return; 268 // even though the scroll gesture doesn't make no (or little) effects on the
269 // slide-out behavior. See http://crbug.com/172991
269 270
270 if (!event->IsScrollGestureEvent()) 271 if (!event->IsScrollGestureEvent())
271 return; 272 return;
272 273
273 if (scroller_) 274 if (scroller_)
274 scroller_->OnGestureEvent(event); 275 scroller_->OnGestureEvent(event);
275 event->SetHandled(); 276 event->SetHandled();
276 } 277 }
277 278
278 void MessageView::ButtonPressed(views::Button* sender, 279 void MessageView::ButtonPressed(views::Button* sender,
(...skipping 17 matching lines...) Expand all
296 gfx::Rect(screen_location, gfx::Size()), 297 gfx::Rect(screen_location, gfx::Size()),
297 views::MenuItemView::TOPRIGHT, 298 views::MenuItemView::TOPRIGHT,
298 views::MenuRunner::HAS_MNEMONICS)); 299 views::MenuRunner::HAS_MNEMONICS));
299 } 300 }
300 301
301 void MessageView::OnSlideOut() { 302 void MessageView::OnSlideOut() {
302 list_delegate_->SendRemoveNotification(notification_.id); 303 list_delegate_->SendRemoveNotification(notification_.id);
303 } 304 }
304 305
305 } // namespace message_center 306 } // namespace message_center
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698