| 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/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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |