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/views/widget/root_view.h" | 5 #include "ui/views/widget/root_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 // that event type has been refactored, and then | 255 // that event type has been refactored, and then |
256 // eventually remove this function altogether. See | 256 // eventually remove this function altogether. See |
257 // crbug.com/348083. | 257 // crbug.com/348083. |
258 if (event->IsKeyEvent()) | 258 if (event->IsKeyEvent()) |
259 return EventProcessor::OnEventFromSource(event); | 259 return EventProcessor::OnEventFromSource(event); |
260 else if (event->IsScrollEvent()) | 260 else if (event->IsScrollEvent()) |
261 return EventProcessor::OnEventFromSource(event); | 261 return EventProcessor::OnEventFromSource(event); |
262 else if (event->IsTouchEvent()) | 262 else if (event->IsTouchEvent()) |
263 NOTREACHED() << "Touch events should not be sent to RootView."; | 263 NOTREACHED() << "Touch events should not be sent to RootView."; |
264 else if (event->IsGestureEvent()) | 264 else if (event->IsGestureEvent()) |
265 DispatchGestureEvent(static_cast<ui::GestureEvent*>(event)); | 265 DispatchGestureEvent(event->AsGestureEvent()); |
266 else if (event->IsMouseEvent()) | 266 else if (event->IsMouseEvent()) |
267 NOTREACHED() << "Should not be called with a MouseEvent."; | 267 NOTREACHED() << "Should not be called with a MouseEvent."; |
268 else | 268 else |
269 NOTREACHED() << "Invalid event type."; | 269 NOTREACHED() << "Invalid event type."; |
270 | 270 |
271 return DispatchDetails(); | 271 return DispatchDetails(); |
272 } | 272 } |
273 | 273 |
274 //////////////////////////////////////////////////////////////////////////////// | 274 //////////////////////////////////////////////////////////////////////////////// |
275 // RootView, View overrides: | 275 // RootView, View overrides: |
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
808 | 808 |
809 #ifndef NDEBUG | 809 #ifndef NDEBUG |
810 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); | 810 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); |
811 #endif | 811 #endif |
812 | 812 |
813 return details; | 813 return details; |
814 } | 814 } |
815 | 815 |
816 } // namespace internal | 816 } // namespace internal |
817 } // namespace views | 817 } // namespace views |
OLD | NEW |