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

Unified Diff: components/web_view/web_view_impl.cc

Issue 1317713006: Changes around how embed roots are set (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup Created 5 years, 3 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: components/web_view/web_view_impl.cc
diff --git a/components/web_view/web_view_impl.cc b/components/web_view/web_view_impl.cc
index 322fcaefa468458497f891a802ff1c03e46803e1..e73058937ec679c22701d31446d6c1c148c9083c 100644
--- a/components/web_view/web_view_impl.cc
+++ b/components/web_view/web_view_impl.cc
@@ -92,7 +92,9 @@ void WebViewImpl::GetViewTreeClient(
// WebViewImpl, mojo::ViewTreeDelegate implementation:
void WebViewImpl::OnEmbed(mojo::View* root) {
- root->connection()->SetEmbedRoot();
+ // We must have been granted embed root priviledges, otherwise we can't
+ // Embed() in any descendants.
+ DCHECK(root->connection()->IsEmbedRoot());
root->AddObserver(this);
root_ = root;
content_ = root->connection()->CreateView();

Powered by Google App Engine
This is Rietveld 408576698