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

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

Issue 354063003: View should store a ViewTargeter instead of an EventTargeter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment addressed Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ui/views/view_targeter_unittest.cc ('k') | ui/views/widget/root_view_unittest.cc » ('j') | 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/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 scroll_gesture_handler_(NULL), 162 scroll_gesture_handler_(NULL),
163 pre_dispatch_handler_(new internal::PreEventDispatchHandler(this)), 163 pre_dispatch_handler_(new internal::PreEventDispatchHandler(this)),
164 post_dispatch_handler_(new internal::PostEventDispatchHandler), 164 post_dispatch_handler_(new internal::PostEventDispatchHandler),
165 focus_search_(this, false, false), 165 focus_search_(this, false, false),
166 focus_traversable_parent_(NULL), 166 focus_traversable_parent_(NULL),
167 focus_traversable_parent_view_(NULL), 167 focus_traversable_parent_view_(NULL),
168 event_dispatch_target_(NULL), 168 event_dispatch_target_(NULL),
169 old_dispatch_target_(NULL) { 169 old_dispatch_target_(NULL) {
170 AddPreTargetHandler(pre_dispatch_handler_.get()); 170 AddPreTargetHandler(pre_dispatch_handler_.get());
171 AddPostTargetHandler(post_dispatch_handler_.get()); 171 AddPostTargetHandler(post_dispatch_handler_.get());
172 SetEventTargeter(scoped_ptr<ui::EventTargeter>(new ViewTargeter())); 172 SetEventTargeter(scoped_ptr<ViewTargeter>(new ViewTargeter()));
173 } 173 }
174 174
175 RootView::~RootView() { 175 RootView::~RootView() {
176 // If we have children remove them explicitly so to make sure a remove 176 // If we have children remove them explicitly so to make sure a remove
177 // notification is sent for each one of them. 177 // notification is sent for each one of them.
178 if (has_children()) 178 if (has_children())
179 RemoveAllChildViews(true); 179 RemoveAllChildViews(true);
180 } 180 }
181 181
182 // Tree operations ------------------------------------------------------------- 182 // Tree operations -------------------------------------------------------------
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ui/views/view_targeter_unittest.cc ('k') | ui/views/widget/root_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698