| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 return focus_traversable_parent_; | 245 return focus_traversable_parent_; |
| 246 } | 246 } |
| 247 | 247 |
| 248 View* RootView::GetFocusTraversableParentView() { | 248 View* RootView::GetFocusTraversableParentView() { |
| 249 return focus_traversable_parent_view_; | 249 return focus_traversable_parent_view_; |
| 250 } | 250 } |
| 251 | 251 |
| 252 //////////////////////////////////////////////////////////////////////////////// | 252 //////////////////////////////////////////////////////////////////////////////// |
| 253 // RootView, ui::EventProcessor overrides: | 253 // RootView, ui::EventProcessor overrides: |
| 254 | 254 |
| 255 ui::EventTarget* RootView::GetRootForEvent(ui::Event* event) { | 255 ui::EventTarget* RootView::GetRootTarget() { |
| 256 return this; | 256 return this; |
| 257 } | 257 } |
| 258 | 258 |
| 259 ui::EventTargeter* RootView::GetDefaultEventTargeter() { | |
| 260 return this->GetEventTargeter(); | |
| 261 } | |
| 262 | |
| 263 void RootView::OnEventProcessingStarted(ui::Event* event) { | 259 void RootView::OnEventProcessingStarted(ui::Event* event) { |
| 264 if (!event->IsGestureEvent()) | 260 if (!event->IsGestureEvent()) |
| 265 return; | 261 return; |
| 266 | 262 |
| 267 ui::GestureEvent* gesture_event = event->AsGestureEvent(); | 263 ui::GestureEvent* gesture_event = event->AsGestureEvent(); |
| 268 | 264 |
| 269 // Do not process ui::ET_GESTURE_BEGIN events. | 265 // Do not process ui::ET_GESTURE_BEGIN events. |
| 270 if (gesture_event->type() == ui::ET_GESTURE_BEGIN) { | 266 if (gesture_event->type() == ui::ET_GESTURE_BEGIN) { |
| 271 event->SetHandled(); | 267 event->SetHandled(); |
| 272 return; | 268 return; |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 | 752 |
| 757 #ifndef NDEBUG | 753 #ifndef NDEBUG |
| 758 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); | 754 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); |
| 759 #endif | 755 #endif |
| 760 | 756 |
| 761 return details; | 757 return details; |
| 762 } | 758 } |
| 763 | 759 |
| 764 } // namespace internal | 760 } // namespace internal |
| 765 } // namespace views | 761 } // namespace views |
| OLD | NEW |