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

Unified Diff: ui/views/view.cc

Issue 10384068: views: Have a more accurate name for View parent_owned accessors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/view.h ('k') | ui/views/window/non_client_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view.cc
diff --git a/ui/views/view.cc b/ui/views/view.cc
index d42ec5c5ab781a1b80b1a6886fa9fcdfb6394e10..379f56840a54c4da08b07cd992173c982b76a710 100644
--- a/ui/views/view.cc
+++ b/ui/views/view.cc
@@ -96,7 +96,7 @@ const char View::kViewClassName[] = "views/View";
// Creation and lifetime -------------------------------------------------------
View::View()
- : parent_owned_(true),
+ : owned_by_client_(false),
id_(0),
group_(-1),
parent_(NULL),
@@ -126,7 +126,7 @@ View::~View() {
for (Views::const_iterator i(children_.begin()); i != children_.end(); ++i) {
(*i)->parent_ = NULL;
- if ((*i)->parent_owned())
+ if (!(*i)->owned_by_client_)
delete *i;
}
@@ -1538,7 +1538,7 @@ void View::DoRemoveChildView(View* view,
view->parent_ = NULL;
view->UpdateLayerVisibility();
- if (delete_removed_view && view->parent_owned())
+ if (delete_removed_view && !view->owned_by_client_)
view_to_be_deleted.reset(view);
children_.erase(i);
« no previous file with comments | « ui/views/view.h ('k') | ui/views/window/non_client_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698