Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1672)

Side by Side Diff: ui/views/widget/root_view.cc

Issue 2681613002: Avoid two targeting phases in aura client-lib and EventProcessor. (Closed)
Patch Set: early return Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/views/widget/root_view.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/root_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698