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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 i->second->OnViewManagerServiceImplDestroyed(connection->id()); | 86 i->second->OnViewManagerServiceImplDestroyed(connection->id()); |
87 } | 87 } |
88 } | 88 } |
89 | 89 |
90 void RootNodeManager::EmbedRoot(const std::string& url) { | 90 void RootNodeManager::EmbedRoot(const std::string& url) { |
91 if (connection_map_.empty()) { | 91 if (connection_map_.empty()) { |
92 EmbedImpl(kRootConnection, String::From(url), InvalidNodeId()); | 92 EmbedImpl(kRootConnection, String::From(url), InvalidNodeId()); |
93 return; | 93 return; |
94 } | 94 } |
95 ViewManagerServiceImpl* connection = GetConnection(kWindowManagerConnection); | 95 ViewManagerServiceImpl* connection = GetConnection(kWindowManagerConnection); |
96 connection->client()->EmbedRoot(url); | 96 connection->client()->Embed(url); |
97 } | 97 } |
98 | 98 |
99 void RootNodeManager::Embed(ConnectionSpecificId creator_id, | 99 void RootNodeManager::Embed(ConnectionSpecificId creator_id, |
100 const String& url, | 100 const String& url, |
101 Id transport_node_id) { | 101 Id transport_node_id) { |
102 EmbedImpl(creator_id, url, NodeIdFromTransportId(transport_node_id))-> | 102 EmbedImpl(creator_id, url, NodeIdFromTransportId(transport_node_id))-> |
103 set_delete_on_connection_error(); | 103 set_delete_on_connection_error(); |
104 } | 104 } |
105 | 105 |
106 ViewManagerServiceImpl* RootNodeManager::GetConnection( | 106 ViewManagerServiceImpl* RootNodeManager::GetConnection( |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 } | 295 } |
296 | 296 |
297 void RootNodeManager::OnViewInputEvent(const View* view, | 297 void RootNodeManager::OnViewInputEvent(const View* view, |
298 const ui::Event* event) { | 298 const ui::Event* event) { |
299 DispatchViewInputEventToWindowManager(view, event); | 299 DispatchViewInputEventToWindowManager(view, event); |
300 } | 300 } |
301 | 301 |
302 } // namespace service | 302 } // namespace service |
303 } // namespace view_manager | 303 } // namespace view_manager |
304 } // namespace mojo | 304 } // namespace mojo |
OLD | NEW |