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

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

Issue 11364062: ui: Remove TouchStatus in favour of EventResult. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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_event_filter.h ('k') | ash/tooltips/tooltip_controller.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_event_filter.h" 5 #include "ash/system/tray/tray_event_filter.h"
6 6
7 #include "ash/root_window_controller.h" 7 #include "ash/root_window_controller.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/system/tray/tray_background_view.h" 10 #include "ash/system/tray/tray_background_view.h"
(...skipping 23 matching lines...) Expand all
34 return false; 34 return false;
35 } 35 }
36 36
37 bool TrayEventFilter::PreHandleMouseEvent(aura::Window* target, 37 bool TrayEventFilter::PreHandleMouseEvent(aura::Window* target,
38 ui::MouseEvent* event) { 38 ui::MouseEvent* event) {
39 if (event->type() == ui::ET_MOUSE_PRESSED) 39 if (event->type() == ui::ET_MOUSE_PRESSED)
40 return ProcessLocatedEvent(target, *event); 40 return ProcessLocatedEvent(target, *event);
41 return false; 41 return false;
42 } 42 }
43 43
44 ui::TouchStatus TrayEventFilter::PreHandleTouchEvent(aura::Window* target, 44 ui::EventResult TrayEventFilter::PreHandleTouchEvent(aura::Window* target,
45 ui::TouchEvent* event) { 45 ui::TouchEvent* event) {
46 if (event->type() == ui::ET_TOUCH_PRESSED) { 46 if (event->type() == ui::ET_TOUCH_PRESSED) {
47 if (ProcessLocatedEvent(target, *event)) 47 if (ProcessLocatedEvent(target, *event))
48 return ui::TOUCH_STATUS_END; 48 return ui::ER_CONSUMED;
49 } 49 }
50 return ui::TOUCH_STATUS_UNKNOWN; 50 return ui::ER_UNHANDLED;
51 } 51 }
52 52
53 ui::EventResult TrayEventFilter::PreHandleGestureEvent( 53 ui::EventResult TrayEventFilter::PreHandleGestureEvent(
54 aura::Window* target, 54 aura::Window* target,
55 ui::GestureEvent* event) { 55 ui::GestureEvent* event) {
56 return ui::ER_UNHANDLED; 56 return ui::ER_UNHANDLED;
57 } 57 }
58 58
59 bool TrayEventFilter::ProcessLocatedEvent(aura::Window* target, 59 bool TrayEventFilter::ProcessLocatedEvent(aura::Window* target,
60 const ui::LocatedEvent& event) { 60 const ui::LocatedEvent& event) {
(...skipping 22 matching lines...) Expand all
83 if (bounds.Contains(event.root_location())) 83 if (bounds.Contains(event.root_location()))
84 return false; 84 return false;
85 } 85 }
86 // Handle clicking outside the bubble and tray and return true if the 86 // Handle clicking outside the bubble and tray and return true if the
87 // event was handled. 87 // event was handled.
88 return wrapper_->tray()->ClickedOutsideBubble(); 88 return wrapper_->tray()->ClickedOutsideBubble();
89 } 89 }
90 90
91 } // namespace internal 91 } // namespace internal
92 } // namespace ash 92 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray/tray_event_filter.h ('k') | ash/tooltips/tooltip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698