| 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/public/cpp/application/application_connection.h" | 8 #include "mojo/public/cpp/application/application_connection.h" |
| 9 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 9 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
| 10 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h" | 10 #include "mojo/services/public/cpp/input_events/input_events_type_converters.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 void RootNodeManager::OnConnectionMessagedClient(ConnectionSpecificId id) { | 124 void RootNodeManager::OnConnectionMessagedClient(ConnectionSpecificId id) { |
| 125 if (current_change_) | 125 if (current_change_) |
| 126 current_change_->MarkConnectionAsMessaged(id); | 126 current_change_->MarkConnectionAsMessaged(id); |
| 127 } | 127 } |
| 128 | 128 |
| 129 bool RootNodeManager::DidConnectionMessageClient( | 129 bool RootNodeManager::DidConnectionMessageClient( |
| 130 ConnectionSpecificId id) const { | 130 ConnectionSpecificId id) const { |
| 131 return current_change_ && current_change_->DidMessageConnection(id); | 131 return current_change_ && current_change_->DidMessageConnection(id); |
| 132 } | 132 } |
| 133 | 133 |
| 134 ViewManagerServiceImpl* RootNodeManager::GetConnectionByCreator( | |
| 135 ConnectionSpecificId creator_id, | |
| 136 const std::string& url) const { | |
| 137 for (ConnectionMap::const_iterator i = connection_map_.begin(); | |
| 138 i != connection_map_.end(); ++i) { | |
| 139 if (i->second->creator_id() == creator_id && i->second->url() == url) | |
| 140 return i->second; | |
| 141 } | |
| 142 return NULL; | |
| 143 } | |
| 144 | |
| 145 const ViewManagerServiceImpl* RootNodeManager::GetConnectionWithRoot( | 134 const ViewManagerServiceImpl* RootNodeManager::GetConnectionWithRoot( |
| 146 const NodeId& id) const { | 135 const NodeId& id) const { |
| 147 for (ConnectionMap::const_iterator i = connection_map_.begin(); | 136 for (ConnectionMap::const_iterator i = connection_map_.begin(); |
| 148 i != connection_map_.end(); ++i) { | 137 i != connection_map_.end(); ++i) { |
| 149 if (i->second->HasRoot(id)) | 138 if (i->second->HasRoot(id)) |
| 150 return i->second; | 139 return i->second; |
| 151 } | 140 } |
| 152 return NULL; | 141 return NULL; |
| 153 } | 142 } |
| 154 | 143 |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 ProcessNodeBoundsChanged(node, old_bounds, new_bounds); | 262 ProcessNodeBoundsChanged(node, old_bounds, new_bounds); |
| 274 } | 263 } |
| 275 | 264 |
| 276 void RootNodeManager::OnNodeInputEvent(const Node* node, | 265 void RootNodeManager::OnNodeInputEvent(const Node* node, |
| 277 const ui::Event* event) { | 266 const ui::Event* event) { |
| 278 DispatchNodeInputEventToWindowManager(node, event); | 267 DispatchNodeInputEventToWindowManager(node, event); |
| 279 } | 268 } |
| 280 | 269 |
| 281 } // namespace service | 270 } // namespace service |
| 282 } // namespace mojo | 271 } // namespace mojo |
| OLD | NEW |