| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 return focus_traversable_parent_; | 239 return focus_traversable_parent_; |
| 240 } | 240 } |
| 241 | 241 |
| 242 View* RootView::GetFocusTraversableParentView() { | 242 View* RootView::GetFocusTraversableParentView() { |
| 243 return focus_traversable_parent_view_; | 243 return focus_traversable_parent_view_; |
| 244 } | 244 } |
| 245 | 245 |
| 246 //////////////////////////////////////////////////////////////////////////////// | 246 //////////////////////////////////////////////////////////////////////////////// |
| 247 // RootView, ui::EventProcessor overrides: | 247 // RootView, ui::EventProcessor overrides: |
| 248 | 248 |
| 249 ui::EventTarget* RootView::GetRootTarget() { | 249 ui::EventTarget* RootView::GetRootForEvent(ui::Event* event) { |
| 250 return this; | 250 return this; |
| 251 } | 251 } |
| 252 | 252 |
| 253 ui::EventTargeter* RootView::GetDefaultEventTargeter() { |
| 254 return this->GetEventTargeter(); |
| 255 } |
| 256 |
| 253 void RootView::OnEventProcessingStarted(ui::Event* event) { | 257 void RootView::OnEventProcessingStarted(ui::Event* event) { |
| 254 if (!event->IsGestureEvent()) | 258 if (!event->IsGestureEvent()) |
| 255 return; | 259 return; |
| 256 | 260 |
| 257 ui::GestureEvent* gesture_event = event->AsGestureEvent(); | 261 ui::GestureEvent* gesture_event = event->AsGestureEvent(); |
| 258 | 262 |
| 259 // Do not process ui::ET_GESTURE_BEGIN events. | 263 // Do not process ui::ET_GESTURE_BEGIN events. |
| 260 if (gesture_event->type() == ui::ET_GESTURE_BEGIN) { | 264 if (gesture_event->type() == ui::ET_GESTURE_BEGIN) { |
| 261 event->SetHandled(); | 265 event->SetHandled(); |
| 262 return; | 266 return; |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 | 750 |
| 747 #ifndef NDEBUG | 751 #ifndef NDEBUG |
| 748 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); | 752 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); |
| 749 #endif | 753 #endif |
| 750 | 754 |
| 751 return details; | 755 return details; |
| 752 } | 756 } |
| 753 | 757 |
| 754 } // namespace internal | 758 } // namespace internal |
| 755 } // namespace views | 759 } // namespace views |
| OLD | NEW |