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

Unified Diff: components/web_view/frame_tree.cc

Issue 1323233004: Adds better security checking to OnCreatedFrame() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « components/web_view/frame_tree.h ('k') | components/web_view/web_view_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/web_view/frame_tree.cc
diff --git a/components/web_view/frame_tree.cc b/components/web_view/frame_tree.cc
index 51efeca20d79ca850a5d857f6bec6615e8065430..1b59478d8818013c65ad13bb2b1f6f4ebdb7f33a 100644
--- a/components/web_view/frame_tree.cc
+++ b/components/web_view/frame_tree.cc
@@ -13,6 +13,7 @@ namespace web_view {
FrameTree::FrameTree(uint32_t root_app_id,
mojo::View* view,
+ mojo::ViewTreeClientPtr view_tree_client,
FrameTreeDelegate* delegate,
FrameTreeClient* root_client,
scoped_ptr<FrameUserData> user_data,
@@ -29,7 +30,7 @@ FrameTree::FrameTree(uint32_t root_app_id,
client_properties),
progress_(0.f),
change_id_(1u) {
- root_.Init(nullptr);
+ root_.Init(nullptr, view_tree_client.Pass());
}
FrameTree::~FrameTree() {
@@ -50,7 +51,7 @@ Frame* FrameTree::CreateAndAddFrame(mojo::View* view,
user_data.Pass(), Frame::ClientPropertyMap());
}
-void FrameTree::CreateSharedFrame(
+Frame* FrameTree::CreateSharedFrame(
Frame* parent,
uint32_t frame_id,
uint32_t app_id,
@@ -58,8 +59,8 @@ void FrameTree::CreateSharedFrame(
mojo::View* frame_view = root_.view()->GetChildById(frame_id);
// |frame_view| may be null if the View hasn't been created yet. If this is
// the case the View will be connected to the Frame in Frame::OnTreeChanged.
- CreateAndAddFrameImpl(frame_view, frame_id, app_id, parent, nullptr, nullptr,
- client_properties);
+ return CreateAndAddFrameImpl(frame_view, frame_id, app_id, parent, nullptr,
+ nullptr, client_properties);
}
uint32_t FrameTree::AdvanceChangeID() {
@@ -77,7 +78,7 @@ Frame* FrameTree::CreateAndAddFrameImpl(
Frame* frame =
new Frame(this, view, frame_id, app_id, ViewOwnership::OWNS_VIEW, client,
user_data.Pass(), client_properties);
- frame->Init(parent);
+ frame->Init(parent, nullptr);
return frame;
}
« no previous file with comments | « components/web_view/frame_tree.h ('k') | components/web_view/web_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698