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

Unified Diff: ui/base/models/tree_node_model.h

Issue 7003039: ui/base/models: Add empty() accessor to TreeNode class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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/base/models/tree_node_iterator.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/models/tree_node_model.h
diff --git a/ui/base/models/tree_node_model.h b/ui/base/models/tree_node_model.h
index 29443f938f971ef1569f454e5c0686ceb6e4182e..29f8ece2afa927381a830aba3d89bf52beea88b7 100644
--- a/ui/base/models/tree_node_model.h
+++ b/ui/base/models/tree_node_model.h
@@ -112,6 +112,9 @@ class TreeNode : public TreeModelNode {
// Returns the number of children.
int child_count() const { return static_cast<int>(children_->size()); }
+ // Returns whether the |children_| is empty.
sky 2011/06/08 15:52:26 Returns true if this nodes has no children.
tfarina 2011/06/08 17:33:43 Done.
+ bool empty() const { return children_.empty(); }
+
// Returns the number of all nodes in the subtree rooted at this node,
// including this node.
int GetTotalNodeCount() const {
« no previous file with comments | « ui/base/models/tree_node_iterator.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698