| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "mojo/services/view_manager/root_node_manager.h" | 5 #include "mojo/services/view_manager/root_node_manager.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "mojo/services/view_manager/view_manager_connection.h" | 8 #include "mojo/services/view_manager/view_manager_connection.h" |
| 9 #include "ui/aura/env.h" | 9 #include "ui/aura/env.h" |
| 10 | 10 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 return &root_; | 83 return &root_; |
| 84 ConnectionMap::iterator i = connection_map_.find(id.connection_id); | 84 ConnectionMap::iterator i = connection_map_.find(id.connection_id); |
| 85 return i == connection_map_.end() ? NULL : i->second->GetNode(id); | 85 return i == connection_map_.end() ? NULL : i->second->GetNode(id); |
| 86 } | 86 } |
| 87 | 87 |
| 88 View* RootNodeManager::GetView(const ViewId& id) { | 88 View* RootNodeManager::GetView(const ViewId& id) { |
| 89 ConnectionMap::iterator i = connection_map_.find(id.connection_id); | 89 ConnectionMap::iterator i = connection_map_.find(id.connection_id); |
| 90 return i == connection_map_.end() ? NULL : i->second->GetView(id); | 90 return i == connection_map_.end() ? NULL : i->second->GetView(id); |
| 91 } | 91 } |
| 92 | 92 |
| 93 void RootNodeManager::ProcessNodeBoundsChanged(const Node* node, |
| 94 const gfx::Rect& old_bounds, |
| 95 const gfx::Rect& new_bounds) { |
| 96 for (ConnectionMap::iterator i = connection_map_.begin(); |
| 97 i != connection_map_.end(); ++i) { |
| 98 i->second->ProcessNodeBoundsChanged(node, old_bounds, new_bounds, |
| 99 IsChangeSource(i->first)); |
| 100 } |
| 101 } |
| 102 |
| 93 void RootNodeManager::ProcessNodeHierarchyChanged(const Node* node, | 103 void RootNodeManager::ProcessNodeHierarchyChanged(const Node* node, |
| 94 const Node* new_parent, | 104 const Node* new_parent, |
| 95 const Node* old_parent) { | 105 const Node* old_parent) { |
| 96 for (ConnectionMap::iterator i = connection_map_.begin(); | 106 for (ConnectionMap::iterator i = connection_map_.begin(); |
| 97 i != connection_map_.end(); ++i) { | 107 i != connection_map_.end(); ++i) { |
| 98 i->second->ProcessNodeHierarchyChanged( | 108 i->second->ProcessNodeHierarchyChanged( |
| 99 node, new_parent, old_parent, next_server_change_id_, | 109 node, new_parent, old_parent, next_server_change_id_, |
| 100 IsChangeSource(i->first)); | 110 IsChangeSource(i->first)); |
| 101 } | 111 } |
| 102 } | 112 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 162 |
| 153 void RootNodeManager::OnNodeViewReplaced(const Node* node, | 163 void RootNodeManager::OnNodeViewReplaced(const Node* node, |
| 154 const View* new_view, | 164 const View* new_view, |
| 155 const View* old_view) { | 165 const View* old_view) { |
| 156 ProcessNodeViewReplaced(node, new_view, old_view); | 166 ProcessNodeViewReplaced(node, new_view, old_view); |
| 157 } | 167 } |
| 158 | 168 |
| 159 } // namespace service | 169 } // namespace service |
| 160 } // namespace view_manager | 170 } // namespace view_manager |
| 161 } // namespace mojo | 171 } // namespace mojo |
| OLD | NEW |