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

Unified Diff: mojo/services/public/cpp/view_manager/lib/view_tree_node.cc

Issue 310223002: Get most of the View Manager client lib tests to pass again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: mojo/services/public/cpp/view_manager/lib/view_tree_node.cc
diff --git a/mojo/services/public/cpp/view_manager/lib/view_tree_node.cc b/mojo/services/public/cpp/view_manager/lib/view_tree_node.cc
index 203d15ef6eed4996644b5c756a8dfa6c6e6389f3..9c46b2cd6377b59da64521079d940c7a2adc5965 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_tree_node.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_tree_node.cc
@@ -45,19 +45,10 @@ void NotifyViewTreeChangeDown(
void NotifyViewTreeChange(
const ViewTreeNodeObserver::TreeChangeParams& params) {
NotifyViewTreeChangeDown(params.target, params);
- switch (params.phase) {
- case ViewTreeNodeObserver::DISPOSITION_CHANGING:
- if (params.old_parent)
- NotifyViewTreeChangeUp(params.old_parent, params);
- break;
- case ViewTreeNodeObserver::DISPOSITION_CHANGED:
- if (params.new_parent)
- NotifyViewTreeChangeUp(params.new_parent, params);
- break;
- default:
- NOTREACHED();
- break;
- }
+ if (params.old_parent)
+ NotifyViewTreeChangeUp(params.old_parent, params);
+ if (params.new_parent)
+ NotifyViewTreeChangeUp(params.new_parent, params);
}
class ScopedTreeNotifier {
@@ -321,7 +312,7 @@ void ViewTreeNode::LocalAddChild(ViewTreeNode* child) {
void ViewTreeNode::LocalRemoveChild(ViewTreeNode* child) {
DCHECK_EQ(this, child->parent());
- ScopedTreeNotifier(child, this, NULL);
+ ScopedTreeNotifier notifier(child, this, NULL);
RemoveChildImpl(child, &children_);
}

Powered by Google App Engine
This is Rietveld 408576698