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/display/mouse_cursor_event_filter.h" | 5 #include "ash/display/mouse_cursor_event_filter.h" |
6 | 6 |
7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
8 #include "ash/display/shared_display_edge_indicator.h" | 8 #include "ash/display/shared_display_edge_indicator.h" |
9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 event->type() != ui::ET_MOUSE_DRAGGED) { | 85 event->type() != ui::ET_MOUSE_DRAGGED) { |
86 return false; | 86 return false; |
87 } | 87 } |
88 | 88 |
89 gfx::Point point_in_screen(event->location()); | 89 gfx::Point point_in_screen(event->location()); |
90 wm::ConvertPointToScreen(target, &point_in_screen); | 90 wm::ConvertPointToScreen(target, &point_in_screen); |
91 return | 91 return |
92 WarpMouseCursorIfNecessary(target->GetRootWindow(), point_in_screen); | 92 WarpMouseCursorIfNecessary(target->GetRootWindow(), point_in_screen); |
93 } | 93 } |
94 | 94 |
95 ui::TouchStatus MouseCursorEventFilter::PreHandleTouchEvent( | 95 ui::EventResult MouseCursorEventFilter::PreHandleTouchEvent( |
96 aura::Window* target, | 96 aura::Window* target, |
97 ui::TouchEvent* event) { | 97 ui::TouchEvent* event) { |
98 return ui::TOUCH_STATUS_UNKNOWN; | 98 return ui::ER_UNHANDLED; |
99 } | 99 } |
100 | 100 |
101 ui::EventResult MouseCursorEventFilter::PreHandleGestureEvent( | 101 ui::EventResult MouseCursorEventFilter::PreHandleGestureEvent( |
102 aura::Window* target, | 102 aura::Window* target, |
103 ui::GestureEvent* event) { | 103 ui::GestureEvent* event) { |
104 return ui::ER_UNHANDLED; | 104 return ui::ER_UNHANDLED; |
105 } | 105 } |
106 | 106 |
107 bool MouseCursorEventFilter::WarpMouseCursorIfNecessary( | 107 bool MouseCursorEventFilter::WarpMouseCursorIfNecessary( |
108 aura::RootWindow* target_root, | 108 aura::RootWindow* target_root, |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 std::max(upper_shared_y, lower_indicator_y + kMinimumIndicatorHeight); | 227 std::max(upper_shared_y, lower_indicator_y + kMinimumIndicatorHeight); |
228 } else { | 228 } else { |
229 upper_indicator_y = std::max(upper_indicator_y, upper_shared_y); | 229 upper_indicator_y = std::max(upper_indicator_y, upper_shared_y); |
230 } | 230 } |
231 src_indicator_bounds_.set_y(upper_indicator_y); | 231 src_indicator_bounds_.set_y(upper_indicator_y); |
232 src_indicator_bounds_.set_height(lower_indicator_y - upper_indicator_y); | 232 src_indicator_bounds_.set_height(lower_indicator_y - upper_indicator_y); |
233 } | 233 } |
234 | 234 |
235 } // namespace internal | 235 } // namespace internal |
236 } // namespace ash | 236 } // namespace ash |
OLD | NEW |