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

Side by Side Diff: ash/system/tray/tray_notification_view.cc

Issue 11280290: events: Change gesture-event handler in EventHandler to not return any values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | « ash/system/tray/tray_notification_view.h ('k') | ash/system/tray/tray_views.h » ('j') | 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 "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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void TrayNotificationView::ButtonPressed(views::Button* sender, 117 void TrayNotificationView::ButtonPressed(views::Button* sender,
118 const ui::Event& event) { 118 const ui::Event& event) {
119 HandleClose(); 119 HandleClose();
120 } 120 }
121 121
122 bool TrayNotificationView::OnMousePressed(const ui::MouseEvent& event) { 122 bool TrayNotificationView::OnMousePressed(const ui::MouseEvent& event) {
123 HandleClickAction(); 123 HandleClickAction();
124 return true; 124 return true;
125 } 125 }
126 126
127 ui::EventResult TrayNotificationView::OnGestureEvent(ui::GestureEvent* event) { 127 void TrayNotificationView::OnGestureEvent(ui::GestureEvent* event) {
128 if (SlideOutView::OnGestureEvent(event) == ui::ER_CONSUMED) 128 SlideOutView::OnGestureEvent(event);
129 return ui::ER_CONSUMED; 129 if (event->handled())
130 return;
130 if (event->type() != ui::ET_GESTURE_TAP) 131 if (event->type() != ui::ET_GESTURE_TAP)
131 return ui::ER_UNHANDLED; 132 return;
132 HandleClickAction(); 133 HandleClickAction();
133 return ui::ER_CONSUMED; 134 event->SetHandled();
134 } 135 }
135 136
136 void TrayNotificationView::OnClose() { 137 void TrayNotificationView::OnClose() {
137 } 138 }
138 139
139 void TrayNotificationView::OnClickAction() { 140 void TrayNotificationView::OnClickAction() {
140 } 141 }
141 142
142 void TrayNotificationView::OnSlideOut() { 143 void TrayNotificationView::OnSlideOut() {
143 owner_->HideNotificationView(); 144 owner_->HideNotificationView();
144 } 145 }
145 146
146 void TrayNotificationView::HandleClose() { 147 void TrayNotificationView::HandleClose() {
147 OnClose(); 148 OnClose();
148 owner_->HideNotificationView(); 149 owner_->HideNotificationView();
149 } 150 }
150 151
151 void TrayNotificationView::HandleClickAction() { 152 void TrayNotificationView::HandleClickAction() {
152 HandleClose(); 153 HandleClose();
153 OnClickAction(); 154 OnClickAction();
154 } 155 }
155 156
156 } // namespace internal 157 } // namespace internal
157 } // namespace ash 158 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_notification_view.h ('k') | ash/system/tray/tray_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698