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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 ConnectionSpecificId creator_id, | 135 ConnectionSpecificId creator_id, |
136 const std::string& url) const { | 136 const std::string& url) const { |
137 for (ConnectionMap::const_iterator i = connection_map_.begin(); | 137 for (ConnectionMap::const_iterator i = connection_map_.begin(); |
138 i != connection_map_.end(); ++i) { | 138 i != connection_map_.end(); ++i) { |
139 if (i->second->creator_id() == creator_id && i->second->url() == url) | 139 if (i->second->creator_id() == creator_id && i->second->url() == url) |
140 return i->second; | 140 return i->second; |
141 } | 141 } |
142 return NULL; | 142 return NULL; |
143 } | 143 } |
144 | 144 |
145 ViewManagerServiceImpl* RootNodeManager::GetConnectionWithRoot( | 145 const ViewManagerServiceImpl* RootNodeManager::GetConnectionWithRoot( |
146 const NodeId& id) { | 146 const NodeId& id) const { |
147 for (ConnectionMap::const_iterator i = connection_map_.begin(); | 147 for (ConnectionMap::const_iterator i = connection_map_.begin(); |
148 i != connection_map_.end(); ++i) { | 148 i != connection_map_.end(); ++i) { |
149 if (i->second->HasRoot(id)) | 149 if (i->second->HasRoot(id)) |
150 return i->second; | 150 return i->second; |
151 } | 151 } |
152 return NULL; | 152 return NULL; |
153 } | 153 } |
154 | 154 |
155 void RootNodeManager::DispatchViewInputEventToWindowManager( | 155 void RootNodeManager::DispatchViewInputEventToWindowManager( |
156 const View* view, | 156 const View* view, |
(...skipping 138 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 |