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/service_provider/service_provider.mojom.h" | 9 #include "mojo/public/interfaces/service_provider/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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 ConnectionMap::const_iterator it = connection_map_.find(creator_id); | 253 ConnectionMap::const_iterator it = connection_map_.find(creator_id); |
254 if (it != connection_map_.end()) | 254 if (it != connection_map_.end()) |
255 creator_url = it->second->url(); | 255 creator_url = it->second->url(); |
256 | 256 |
257 ViewManagerServiceImpl* connection = | 257 ViewManagerServiceImpl* connection = |
258 new ViewManagerServiceImpl(this, | 258 new ViewManagerServiceImpl(this, |
259 creator_id, | 259 creator_id, |
260 creator_url, | 260 creator_url, |
261 url.To<std::string>()); | 261 url.To<std::string>()); |
262 connection->SetRoots(node_ids); | 262 connection->SetRoots(node_ids); |
263 BindToPipe(connection, pipe.handle0.Pass()); | 263 WeakBindToPipe(connection, pipe.handle0.Pass()); |
264 connections_created_by_connect_.insert(connection); | 264 connections_created_by_connect_.insert(connection); |
265 return connection; | 265 return connection; |
266 } | 266 } |
267 | 267 |
268 void RootNodeManager::OnNodeDestroyed(const Node* node) { | 268 void RootNodeManager::OnNodeDestroyed(const Node* node) { |
269 ProcessNodeDeleted(node->id()); | 269 ProcessNodeDeleted(node->id()); |
270 } | 270 } |
271 | 271 |
272 void RootNodeManager::OnNodeHierarchyChanged(const Node* node, | 272 void RootNodeManager::OnNodeHierarchyChanged(const Node* node, |
273 const Node* new_parent, | 273 const Node* new_parent, |
(...skipping 15 matching lines...) Expand all Loading... |
289 } | 289 } |
290 | 290 |
291 void RootNodeManager::OnViewInputEvent(const View* view, | 291 void RootNodeManager::OnViewInputEvent(const View* view, |
292 const ui::Event* event) { | 292 const ui::Event* event) { |
293 DispatchViewInputEventToWindowManager(view, event); | 293 DispatchViewInputEventToWindowManager(view, event); |
294 } | 294 } |
295 | 295 |
296 } // namespace service | 296 } // namespace service |
297 } // namespace view_manager | 297 } // namespace view_manager |
298 } // namespace mojo | 298 } // namespace mojo |
OLD | NEW |