| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 gesture_handler_set_before_processing_(false), | 165 gesture_handler_set_before_processing_(false), |
| 166 pre_dispatch_handler_(new internal::PreEventDispatchHandler(this)), | 166 pre_dispatch_handler_(new internal::PreEventDispatchHandler(this)), |
| 167 post_dispatch_handler_(new internal::PostEventDispatchHandler), | 167 post_dispatch_handler_(new internal::PostEventDispatchHandler), |
| 168 focus_search_(this, false, false), | 168 focus_search_(this, false, false), |
| 169 focus_traversable_parent_(NULL), | 169 focus_traversable_parent_(NULL), |
| 170 focus_traversable_parent_view_(NULL), | 170 focus_traversable_parent_view_(NULL), |
| 171 event_dispatch_target_(NULL), | 171 event_dispatch_target_(NULL), |
| 172 old_dispatch_target_(NULL) { | 172 old_dispatch_target_(NULL) { |
| 173 AddPreTargetHandler(pre_dispatch_handler_.get()); | 173 AddPreTargetHandler(pre_dispatch_handler_.get()); |
| 174 AddPostTargetHandler(post_dispatch_handler_.get()); | 174 AddPostTargetHandler(post_dispatch_handler_.get()); |
| 175 SetEventTargeter(scoped_ptr<ViewTargeter>(new RootViewTargeter(this, this))); | 175 SetEventTargeter( |
| 176 std::unique_ptr<ViewTargeter>(new RootViewTargeter(this, this))); |
| 176 } | 177 } |
| 177 | 178 |
| 178 RootView::~RootView() { | 179 RootView::~RootView() { |
| 179 // If we have children remove them explicitly so to make sure a remove | 180 // If we have children remove them explicitly so to make sure a remove |
| 180 // notification is sent for each one of them. | 181 // notification is sent for each one of them. |
| 181 if (has_children()) | 182 if (has_children()) |
| 182 RemoveAllChildViews(true); | 183 RemoveAllChildViews(true); |
| 183 } | 184 } |
| 184 | 185 |
| 185 // Tree operations ------------------------------------------------------------- | 186 // Tree operations ------------------------------------------------------------- |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 | 765 |
| 765 #ifndef NDEBUG | 766 #ifndef NDEBUG |
| 766 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); | 767 DCHECK(!event_dispatch_target_ || Contains(event_dispatch_target_)); |
| 767 #endif | 768 #endif |
| 768 | 769 |
| 769 return details; | 770 return details; |
| 770 } | 771 } |
| 771 | 772 |
| 772 } // namespace internal | 773 } // namespace internal |
| 773 } // namespace views | 774 } // namespace views |
| OLD | NEW |