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

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

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr Created 4 years, 8 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') | 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/macros.h" 10 #include "base/macros.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « ui/views/widget/root_view.h ('k') | ui/views/widget/root_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698