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

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

Issue 296133012: Some security checks around destruction/setting bounds. (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_manager_synchronizer.cc
diff --git a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
index 76a6b52f9f190419c6438144f3372b0afd399cc5..a414a4123f82f42261702685dd9b9101a6a55d39 100644
--- a/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
+++ b/mojo/services/public/cpp/view_manager/lib/view_manager_synchronizer.cc
@@ -24,13 +24,15 @@ uint32_t MakeTransportId(uint16_t connection_id, uint16_t local_id) {
ViewTreeNode* AddNodeToViewManager(ViewManager* manager,
ViewTreeNode* parent,
TransportNodeId node_id,
- TransportViewId view_id) {
+ TransportViewId view_id,
+ const gfx::Rect& bounds) {
// We don't use the ctor that takes a ViewManager here, since it will call
// back to the service and attempt to create a new node.
ViewTreeNode* node = ViewTreeNodePrivate::LocalCreate();
ViewTreeNodePrivate private_node(node);
private_node.set_view_manager(manager);
private_node.set_id(node_id);
+ private_node.LocalSetBounds(gfx::Rect(), bounds);
if (parent)
ViewTreeNodePrivate(parent).LocalAddChild(node);
ViewManagerPrivate private_manager(manager);
@@ -67,7 +69,8 @@ ViewTreeNode* BuildNodeTree(ViewManager* manager,
manager,
!parents.empty() ? parents.back() : NULL,
nodes[i].node_id(),
- nodes[i].view_id());
+ nodes[i].view_id(),
+ nodes[i].bounds());
if (!last_node)
root = node;
last_node = node;

Powered by Google App Engine
This is Rietveld 408576698