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

Unified Diff: services/ui/view_manager/view_stub.h

Issue 1775143004: Mozart: Directly associate the renderer with the view tree. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-1
Patch Set: Created 4 years, 9 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 | « services/ui/view_manager/view_registry.cc ('k') | services/ui/view_manager/view_tree_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/view_manager/view_stub.h
diff --git a/services/ui/view_manager/view_stub.h b/services/ui/view_manager/view_stub.h
index 461d0d74237c12b2ab84e3f63cba87c35559f42a..8da47e241044db90e69ca7b181eb28d32a65e8b0 100644
--- a/services/ui/view_manager/view_stub.h
+++ b/services/ui/view_manager/view_stub.h
@@ -50,7 +50,10 @@ class ViewStub {
bool is_pending() const { return !state_ && !unavailable_; }
// Returns true if the view is linked into a tree or parent.
- bool is_linked() const { return tree_ && parent_; }
+ bool is_linked() const { return tree_ || parent_; }
+
+ // Returns true if the view is linked into a tree and has no parent.
+ bool is_root_of_tree() const { return tree_ && !parent_; }
// Gets the view tree to which this view belongs, or null if none.
ViewTreeState* tree() const { return tree_; }
« no previous file with comments | « services/ui/view_manager/view_registry.cc ('k') | services/ui/view_manager/view_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698