Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(749)

Side by Side Diff: mojo/services/view_manager/root_node_manager.cc

Issue 460863002: Rename Node to View in the View Manager mojom & client lib. Service TBD. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/application/service_provider.mojom.h" 9 #include "mojo/public/interfaces/application/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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 } 153 }
154 154
155 void RootNodeManager::DispatchNodeInputEventToWindowManager( 155 void RootNodeManager::DispatchNodeInputEventToWindowManager(
156 const Node* node, 156 const Node* node,
157 const ui::Event* event) { 157 const ui::Event* event) {
158 // Input events are forwarded to the WindowManager. The WindowManager 158 // Input events are forwarded to the WindowManager. The WindowManager
159 // eventually calls back to us with DispatchOnViewInputEvent(). 159 // eventually calls back to us with DispatchOnViewInputEvent().
160 ViewManagerServiceImpl* connection = GetConnection(kWindowManagerConnection); 160 ViewManagerServiceImpl* connection = GetConnection(kWindowManagerConnection);
161 if (!connection) 161 if (!connection)
162 return; 162 return;
163 connection->client()->DispatchOnNodeInputEvent( 163 connection->client()->DispatchOnViewInputEvent(
164 NodeIdToTransportId(node->id()), 164 NodeIdToTransportId(node->id()),
165 TypeConverter<EventPtr, ui::Event>::ConvertFrom(*event)); 165 TypeConverter<EventPtr, ui::Event>::ConvertFrom(*event));
166 } 166 }
167 167
168 void RootNodeManager::ProcessNodeBoundsChanged(const Node* node, 168 void RootNodeManager::ProcessNodeBoundsChanged(const Node* node,
169 const gfx::Rect& old_bounds, 169 const gfx::Rect& old_bounds,
170 const gfx::Rect& new_bounds) { 170 const gfx::Rect& new_bounds) {
171 for (ConnectionMap::iterator i = connection_map_.begin(); 171 for (ConnectionMap::iterator i = connection_map_.begin();
172 i != connection_map_.end(); ++i) { 172 i != connection_map_.end(); ++i) {
173 i->second->ProcessNodeBoundsChanged(node, old_bounds, new_bounds, 173 i->second->ProcessNodeBoundsChanged(node, old_bounds, new_bounds,
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 ProcessNodeBoundsChanged(node, old_bounds, new_bounds); 273 ProcessNodeBoundsChanged(node, old_bounds, new_bounds);
274 } 274 }
275 275
276 void RootNodeManager::OnNodeInputEvent(const Node* node, 276 void RootNodeManager::OnNodeInputEvent(const Node* node,
277 const ui::Event* event) { 277 const ui::Event* event) {
278 DispatchNodeInputEventToWindowManager(node, event); 278 DispatchNodeInputEventToWindowManager(node, event);
279 } 279 }
280 280
281 } // namespace service 281 } // namespace service
282 } // namespace mojo 282 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/public/interfaces/view_manager/view_manager.mojom ('k') | mojo/services/view_manager/test_change_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698