| 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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 // Notify remaining connections so that they can cleanup. | 82 // Notify remaining connections so that they can cleanup. |
| 83 for (ConnectionMap::const_iterator i = connection_map_.begin(); | 83 for (ConnectionMap::const_iterator i = connection_map_.begin(); |
| 84 i != connection_map_.end(); ++i) { | 84 i != connection_map_.end(); ++i) { |
| 85 i->second->OnViewManagerServiceImplDestroyed(connection->id()); | 85 i->second->OnViewManagerServiceImplDestroyed(connection->id()); |
| 86 } | 86 } |
| 87 } | 87 } |
| 88 | 88 |
| 89 void RootNodeManager::EmbedRoot(const std::string& url) { | 89 void RootNodeManager::EmbedRoot(const std::string& url) { |
| 90 if (connection_map_.empty()) { | 90 if (connection_map_.empty()) { |
| 91 EmbedImpl(kRootConnection, String::From(url), InvalidNodeId()); | 91 EmbedImpl(kInvalidConnectionId, String::From(url), RootNodeId()); |
| 92 return; | 92 return; |
| 93 } | 93 } |
| 94 ViewManagerServiceImpl* connection = GetConnection(kWindowManagerConnection); | 94 ViewManagerServiceImpl* connection = GetConnection(kWindowManagerConnection); |
| 95 connection->client()->Embed(url); | 95 connection->client()->Embed(url); |
| 96 } | 96 } |
| 97 | 97 |
| 98 void RootNodeManager::Embed(ConnectionSpecificId creator_id, | 98 void RootNodeManager::Embed(ConnectionSpecificId creator_id, |
| 99 const String& url, | 99 const String& url, |
| 100 Id transport_node_id) { | 100 Id transport_node_id) { |
| 101 EmbedImpl(creator_id, url, NodeIdFromTransportId(transport_node_id))-> | 101 EmbedImpl(creator_id, url, NodeIdFromTransportId(transport_node_id))-> |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 ProcessNodeViewReplaced(node, new_view, old_view); | 293 ProcessNodeViewReplaced(node, new_view, old_view); |
| 294 } | 294 } |
| 295 | 295 |
| 296 void RootNodeManager::OnViewInputEvent(const View* view, | 296 void RootNodeManager::OnViewInputEvent(const View* view, |
| 297 const ui::Event* event) { | 297 const ui::Event* event) { |
| 298 DispatchViewInputEventToWindowManager(view, event); | 298 DispatchViewInputEventToWindowManager(view, event); |
| 299 } | 299 } |
| 300 | 300 |
| 301 } // namespace service | 301 } // namespace service |
| 302 } // namespace mojo | 302 } // namespace mojo |
| OLD | NEW |