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