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