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

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
« no previous file with comments | « no previous file | mojo/services/public/cpp/view_manager/lib/view_tree_node.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11d1b0107f69f93232c886d0e7ff3f4df1d33c67..54fabb7a989d7d4da8d04a264830daed6c7b72a9 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
@@ -26,13 +26,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);
@@ -69,7 +71,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;
« no previous file with comments | « no previous file | mojo/services/public/cpp/view_manager/lib/view_tree_node.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698